Skip to content

Commit b8c9880

Browse files
committed
Add attempt count to logs
1 parent 911bf03 commit b8c9880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/pkg/services/webhook_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (service *WebhookService) sendNotification(ctx context.Context, event cloud
242242
}()
243243

244244
if response.StatusCode >= 400 {
245-
ctxLogger.Info(fmt.Sprintf("cannot send [%s] event to webhook [%s] for user [%s] with response code [%d]", event.Type(), webhook.URL, webhook.UserID, response.StatusCode))
245+
ctxLogger.Info(fmt.Sprintf("cannot send [%s] event to webhook [%s] for user [%s] with response code [%d] after [%d] attempts", event.Type(), webhook.URL, webhook.UserID, response.StatusCode, attempts))
246246
if attempts == 1 {
247247
return stacktrace.NewError(http.StatusText(response.StatusCode))
248248
}

0 commit comments

Comments
 (0)