update error message
Some checks failed
Main CI/CD / Build and push (push) Has been cancelled

This commit is contained in:
pandeptwidyaop
2024-08-15 22:01:34 +08:00
parent 395b328c58
commit d77e676692

View File

@@ -43,9 +43,9 @@ func handleEbook(c *fiber.Ctx) error {
cmd := exec.Command(path.Join(rootPath, "genpdf"), "generate:ebook", sp) cmd := exec.Command(path.Join(rootPath, "genpdf"), "generate:ebook", sp)
o, err := cmd.Output() o, err := cmd.CombinedOutput()
if err != nil { if err != nil {
return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("failed to convert ebook: %s", err)) return c.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("failed to convert ebook: %s", string(o)))
} }
err = c.Download(strings.TrimSpace(string(o))) err = c.Download(strings.TrimSpace(string(o)))
if err != nil { if err != nil {