Skip to content
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

Json decode error instead of HTTPException #17

Merged
merged 3 commits into from May 26, 2017

Conversation

ricco386
Copy link
Contributor

In case kraken has connection problems and it doesnt return 20x status code, we process the code and got Json decode error.

This is confusing as there is a problem with connection to Kraken not with the response it returned. Therefore I have updated connection to raise a proper exception. This way in application developers can handle kraken connection issues gracefully.

In case kraken server return something different that 20x response we
shall throw an proper http exception. Otherwise it would try to parse
JSON and we got JSONDecodeError exception which is confusing.

This way developers could handle better connection problems in their
apps in case kraken has problems.
Minor update when raising an exception lets show the status code so
developer has more information what is going on.
@veox
Copy link
Owner

veox commented May 26, 2017

Cool, thanks!

Warrants at least a MINOR version bump, since function behaviour changed (now raises for a different reason).

@veox veox merged commit 10a2b1b into veox:master May 26, 2017
@veox veox added this to the v1.0 milestone Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants