Skip to content

Commit

Permalink
updated comment for rest.SendErrorJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
witjem authored and umputun committed Nov 12, 2021
1 parent 832f4fd commit 473e332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/rest/httperrors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 473e332

Please sign in to comment.