From 3669b7e6ec01ddcc605f10ac4d2886f2da4dc39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Fri, 5 Apr 2024 09:00:26 +0200 Subject: [PATCH] Added wrappederror explicit logging --- request_response.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/request_response.go b/request_response.go index c2c6ba5..5eaea5b 100644 --- a/request_response.go +++ b/request_response.go @@ -1,6 +1,9 @@ package main import ( + // External + werr "git.gibonuddevalla.se/go/wrappederror" + // Standard "encoding/json" "io" @@ -18,6 +21,8 @@ func responseError(w http.ResponseWriter, err error) { } resJSON, _ := json.Marshal(res) + + werr.Wrap(err).Log() w.Header().Add("Content-Type", "application/json") w.Write(resJSON) }