From 263bcf9250808e2b3064098cbda5118daa79f8b7 Mon Sep 17 00:00:00 2001 From: idanoo Date: Sun, 20 Nov 2022 17:56:08 +1300 Subject: [PATCH] Log errors --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index d19e68d..482bedb 100644 --- a/main.go +++ b/main.go @@ -63,13 +63,11 @@ func handler(w http.ResponseWriter, r *http.Request) { defer r.Body.Close() } - fmt.Printf("Headers: %+v\n", r.Header) - if len(bodyBytes) > 0 { var i IdentifyingRequest err := json.NewDecoder(r.Body).Decode(&i) if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) + log.Println(err.Error()) return }