updated comment for rest.SendErrorJSON

This commit is contained in:
witjem
2021-11-12 03:32:14 -06:00
committed by Umputun
parent 832f4fd858
commit 473e3328e1
+1 -1
View File
@@ -76,7 +76,7 @@ func SendErrorHTML(w http.ResponseWriter, r *http.Request, httpStatusCode int, e
render.HTML(w, r, msg.String())
}
// SendErrorJSON makes {error: blah, details: blah} json body and responds with error code
// SendErrorJSON makes {error: blah, details: blah, code: 42} json body and responds with error code
func SendErrorJSON(w http.ResponseWriter, r *http.Request, httpStatusCode int, err error, details string, errCode int) {
log.Printf("[WARN] %s", errDetailsMsg(r, httpStatusCode, err, details, errCode))
render.Status(r, httpStatusCode)