Add Detailed Error Output for proxyPolls, proxyAnswers

This commit is contained in:
Shelikhoo 2022-04-11 16:30:45 +01:00
parent c7549d886e
commit 50c0d64e10
No known key found for this signature in database
GPG key ID: C4D5E79D22B25316

View file

@ -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
}