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

Better exceptions #4

Closed
MrNaif2018 opened this issue Oct 3, 2019 · 1 comment
Closed

Better exceptions #4

MrNaif2018 opened this issue Oct 3, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@MrNaif2018
Copy link
Member

Currently, upon any error got from server(json data's error key), it is just raised like
raise ValueError(json["data"])
There should be more error classes, maybe autogenerated. Or at least there should be a way to differentiate errors. (instead of doing like if "Error loading wallet" in str(e))
Also, as we have bitcart and bitcart-async, there might be a need in creating special ConnectionError because exceptions in async and sync version differ.

@MrNaif2018
Copy link
Member Author

Done in #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant