-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ClientError handling #209
Conversation
… or application/problem+json e.g : -create project conflit : Error 409 with content-type application/problem+json -projects limit hit : Error 422 with content-type application/json We need to handle both case as they return slightly different structure
Pull Request Test Coverage Report for Build 10670320966Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add also some auto tests that check for some common errors, making sure ClientError is populated as expected...
I updated the PR with the requested changes, and it's ready for another review, to sum up:
Thanks for your patience |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just enhancements about tests
This PR improve the ClientError exception to make it easier to parse and return feedback to user. Instead of relying on a text based error we define variable member of the ClientError Exception than will hold the data response from the server.
Used only for the qgis-plugin for now