eoussama / anusic-api

Anime themes API.
https://anusic-api.herokuapp.com/api/v1/
MIT License
5 stars 0 forks source link

Semantic responses for errors #34

Closed eoussama closed 3 years ago

eoussama commented 3 years ago

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:

eoussama commented 3 years ago

~Provide an error middleware.~