h4i-recruitment
h4i-recruitment copied to clipboard
Standardize Backend Endpoint Responses with middleware
Our REST API Spec Have responses follow this format.
{
"code": 200,
"message": "",
"result": {},
"success": true
}
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.