From dd4892c2ef1728312c7ed98cc143142e97d41a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Eduardo=20Jer=C3=A9z=20Gir=C3=B3n?= Date: Sun, 1 Sep 2024 23:41:54 -0600 Subject: [PATCH] Log error details when failing to send webhook request in runWebhookHandler function --- internal/view/web/dashboard/webhooks/run_webhook.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/view/web/dashboard/webhooks/run_webhook.go b/internal/view/web/dashboard/webhooks/run_webhook.go index c8244c1..2a64ed1 100644 --- a/internal/view/web/dashboard/webhooks/run_webhook.go +++ b/internal/view/web/dashboard/webhooks/run_webhook.go @@ -28,7 +28,13 @@ func (h *handlers) runWebhookHandler(c echo.Context) error { }) return } - _ = h.servs.WebhooksService.SendWebhookRequest(ctx, webhook) + err = h.servs.WebhooksService.SendWebhookRequest(ctx, webhook) + if err != nil { + logger.Error("error sending webhook request", logger.KV{ + "webhook_id": webhook.ID, + "error": err.Error(), + }) + } }() return htmx.RespondToastSuccess(c, "Running webhook, check the webhook executions for more details")