add retutn error in webhook controller method

This commit is contained in:
Pavel 2024-06-20 15:06:12 +03:00
parent f71a339e59
commit 8485991916

@ -45,7 +45,7 @@ func (c *WebhookController) WebhookCreate(ctx *fiber.Ctx) error {
err = c.service.WebhookCreate(ctx.Context(), req)
if err != nil {
c.logger.Error("error create webhook", zap.Error(err))
return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
return ctx.Status(fiber.StatusInternalServerError).SendString(fmt.Sprintf("Internal Server Error: %v", err.Error()))
}
return ctx.Redirect(c.redirectURL)