diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-03-02 16:20:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 16:20:44 +0000 |
commit | 59a1f4b8ed94267f4b4ad426192879dc3bef4f1e (patch) | |
tree | 4cce1217743d5fdadccefcce9e2716464d90d820 /clientapi/httputil | |
parent | 72565f2eeb8988af90590c90c5c8560186db9d62 (diff) |
Remove httputil.LogThenError so that the line numbers are reported properly - make error reporting slightly more useful (#879)
Diffstat (limited to 'clientapi/httputil')
-rw-r--r-- | clientapi/httputil/httputil.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/clientapi/httputil/httputil.go b/clientapi/httputil/httputil.go index 11785f51..b0fe6a6c 100644 --- a/clientapi/httputil/httputil.go +++ b/clientapi/httputil/httputil.go @@ -36,11 +36,3 @@ func UnmarshalJSONRequest(req *http.Request, iface interface{}) *util.JSONRespon } return nil } - -// LogThenError logs the given error then returns a matrix-compliant 500 internal server error response. -// This should be used to log fatal errors which require investigation. It should not be used -// to log client validation errors, etc. -func LogThenError(req *http.Request, err error) util.JSONResponse { - util.GetLogger(req.Context()).WithError(err).Error("request failed") - return jsonerror.InternalServerError() -} |