Open tko22 opened 6 years ago
we could make an express middleware for this instead.
we do the same thing with flask-boilerplate with create_response
https://github.com/tko22/flask-boilerplate/blob/88b9077dad74e7dd30404adffb2bf3ec2cc0bb2e/api/core.py#L27-L50
at least stick to this convention when making new endpoints...
Our REST API Spec Have responses follow this format.
whenever you are editing an endpoint or adding one, standardize it's response.
errorWrap
catches all errors and returns a specific error response so no need to handle errors in endpoints, unless you want a specific message to be given to the client. This issue will be ongoing until all current endpoints responses have been standardized.