Semantic responses for errors
Closed this issue · 1 comments
eoussama commented
There needs to be a constant, predictable object that contains the data and some additional info.
Something like this:
{
"hasError": false,
"error": { "name": "", "description": "" },
"data": {}
}
Errors:
- Invalid route
- Invalid ID (Invalid data type passed as an ID)
- Unknown ID (MAL ID does not match anything cached.
eoussama commented
Provide an error middleware.