From 473e3328e1af2dc289386b5f3f69c95c2e4950c5 Mon Sep 17 00:00:00 2001 From: witjem Date: Thu, 11 Nov 2021 19:06:28 +0100 Subject: [PATCH] updated comment for rest.SendErrorJSON --- backend/app/rest/httperrors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/rest/httperrors.go b/backend/app/rest/httperrors.go index d5310590..e8468ab1 100644 --- a/backend/app/rest/httperrors.go +++ b/backend/app/rest/httperrors.go @@ -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)