This function is used to add a JSON error response to the res object. It is called by the handleErrors() utility function.

jsonError(req, res, err)

Arguments

req

Request object.

res

Response object.

err

Error Error object.

Value

The incoming res object is modified.

See also