Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogThenError ¶
func LogThenError(req *http.Request, err error) util.JSONResponse
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 LogThenErrorCtx ¶
LogThenErrorCtx 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 UnmarshalJSONRequest ¶
func UnmarshalJSONRequest(req *http.Request, iface interface{}) *util.JSONResponse
UnmarshalJSONRequest into the given interface pointer. Returns an error JSON response if there was a problem unmarshalling. Calling this function consumes the request body.
Types ¶
This section is empty.