diff --git a/backend/app/rest/api/rest_private.go b/backend/app/rest/api/rest_private.go index b845367d..c0aed6f4 100644 --- a/backend/app/rest/api/rest_private.go +++ b/backend/app/rest/api/rest_private.go @@ -62,7 +62,7 @@ func (s *private) createCommentCtrl(w http.ResponseWriter, r *http.Request) { user := rest.MustGetUserInfo(r) if user.ID != "admin" && user.SiteID != comment.Locator.SiteID { rest.SendErrorJSON(w, r, http.StatusForbidden, - errors.New("site mismatch, not allowed to post to "+comment.Locator.SiteID), "invalid site", + fmt.Errorf("site mismatch, %q not allowed to post to %s", user.SiteID, comment.Locator.SiteID), "invalid site", rest.ErrCommentValidation) return }