What is the approach to wrapping responses from the server and then process? The API is returning responses in the following format:
SUCCESS:
 {
   "data": [],
   "statusCode": 200,
   "statusMessage": "Operation success",
   "success": true
 }
FAILURE:
  {
    "errors": [],
    "statusCode": 500,
    "statusMessage": "Something went wrong",
    "success": false
  }
I'm trying to apply Clean Architecture principles to my application and I want to know how can I wrap the responses to better handle errors?
 
    