WEEE-Open / pytarallo

Python T.A.R.A.L.L.O. API
MIT License
2 stars 4 forks source link

Create custom errors/exceptions #18

Closed lvps closed 5 years ago

lvps commented 6 years ago

NotFoundError, NotAuthorizedError, ValidationError, any other? Please suggest.

steemnd commented 6 years ago

ValidationError I suppose is a sort of APIv1 related stuff. What happens if the APIv1 can't evaluate a request? What does it return?

lvps commented 6 years ago

For ValidationError I was thinking stuff like "this code contains invalid characters" or "you can't place that item there".

If the API can't evaluate a request to the point that it doesn't even understand what you meant it returns a 400 Bad Request response, or sometimes a 500 but that's a bug and you should report these cases as they happen

steemnd commented 6 years ago

The API still lacks of the ValidationError...