From 50c0d64e108a56dc42623f2c430cda790ed887c6 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 11 Apr 2022 16:30:45 +0100 Subject: [PATCH] Add Detailed Error Output for proxyPolls, proxyAnswers --- broker/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/broker/http.go b/broker/http.go index 3b0ba1f..2f81f1d 100644 --- a/broker/http.go +++ b/broker/http.go @@ -94,7 +94,7 @@ For snowflake proxies to request a client from the Broker. func proxyPolls(i *IPC, w http.ResponseWriter, r *http.Request) { body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit)) if err != nil { - log.Println("Invalid data.") + log.Println("Invalid data.", err.Error()) w.WriteHeader(http.StatusBadRequest) return } @@ -204,7 +204,7 @@ which the broker will pass back to the original client. func proxyAnswers(i *IPC, w http.ResponseWriter, r *http.Request) { body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit)) if err != nil { - log.Println("Invalid data.") + log.Println("Invalid data.", err.Error()) w.WriteHeader(http.StatusBadRequest) return }