Things like 400, 404, 5xx can have a pre-defined set of functions that return an elegant response:
Api::errorNotFound(); // 404
Api::errorBadRequest(); // 400
Api::errorInternal(); // 500
Api::errorForbidden(); // 403
Api::errorUnauthorized(); // 401
etc.
Things like 400, 404, 5xx can have a pre-defined set of functions that return an elegant response:
etc.