-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi! Thank you for this library, it has been quite useful to me. As I've used it I've come across a couple of usage pain points and have a few ideas on how it could be improved. Some of the suggestions would be breaking for users, which is a bummer. Not sure how acceptable that would be for you. I could implement them, if you would be willing to merge my PRs. Thanks for your consideration.
Unify error behavior between single/multiple requests.
Sometimes I make requests with one address, sometimes with multiple. It is annoying that I need two different code paths to deal with the errors when an address isn't found, one where the error is thrown (single address) and one where it is just returned (multiple).
I think all errors should just be returned, and never thrown. It makes things consistent, and isn't any more code for users (in fact it may be less to check result as opposed to filtering between the various errors that could get thrown). This of course would break some users.
Don't squash info in errors
Currently, the detailed error info is just string formatted into the ValueError when an address isn't found, so it's difficult for users to recover the original error. The original info should be included somehow. This wouldn't need to be breaking.