Skip to content

Commit

Permalink
More descriptive log message
Browse files Browse the repository at this point in the history
Signed-off-by: albertteoh <[email protected]>
  • Loading branch information
albertteoh committed Mar 26, 2021
1 parent b962033 commit 41d1996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/query/app/http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ func (aH *APIHandler) writeJSON(w http.ResponseWriter, r *http.Request, response
}
resp, err := marshall(response)
if err != nil {
aH.logger.Error("Marshal HTTP response error", zap.Error(err))
aH.logger.Error("Failed marshalling HTTP response to JSON", zap.Error(err))
return
}
w.Header().Set("Content-Type", "application/json")
if b, err := w.Write(resp); err != nil {
aH.logger.Error("Write HTTP response error", zap.Error(err))
aH.logger.Error("Failed writing HTTP response", zap.Error(err))
} else {
aH.logger.Debug("Successfully wrote HTTP response", zap.Int("bytes", b))
}
Expand Down

0 comments on commit 41d1996

Please sign in to comment.