From 3baffc9befcc0f68a40dc8659c0d779925256c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Thu, 28 Sep 2023 12:59:10 +0200 Subject: [PATCH] Send HTTP error code when failing to decode payload --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 2bf7fa4..979886e 100644 --- a/main.go +++ b/main.go @@ -401,6 +401,7 @@ func (br *bridge) handleWebhooks(w http.ResponseWriter, r *http.Request) { var event payload if err := json.NewDecoder(r.Body).Decode(&event); err != nil { + http.Error(w, "Failed to parse payload", http.StatusInternalServerError) logger.Debug("Failed to decode payload", slog.String("error", err.Error())) return