h4i-recruitment icon indicating copy to clipboard operation
h4i-recruitment copied to clipboard

Standardize Backend Endpoint Responses with middleware

Open tko22 opened this issue 6 years ago • 2 comments

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.

tko22 avatar Jul 18 '18 02:07 tko22