Log errors

This commit is contained in:
idanoo 2022-11-20 17:56:08 +13:00
parent a94a89de96
commit 263bcf9250
Signed by: idanoo
GPG Key ID: 387387CDBC02F132

View File

@ -63,13 +63,11 @@ func handler(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close() defer r.Body.Close()
} }
fmt.Printf("Headers: %+v\n", r.Header)
if len(bodyBytes) > 0 { if len(bodyBytes) > 0 {
var i IdentifyingRequest var i IdentifyingRequest
err := json.NewDecoder(r.Body).Decode(&i) err := json.NewDecoder(r.Body).Decode(&i)
if err != nil { if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest) log.Println(err.Error())
return return
} }