Closed ubaldo closed 8 years ago
Hrm... good point. Perhaps we should just pass
?
I think it would be ideal to define Sift exception types in this library and not expose requests
exceptions to the caller. This makes catching them require the caller either 1. import requests
or 2. catch naked/unnamed exceptions.
I'm much prefer to do something like
try:
client.XXX
except sift.ReadTimeout
# handle here
If this is interest in this I could propose a PR.
Yeah, I like that. Please do!
@fredsadaghiani Sounds good. Might take me a couple of days to get to it.
@zackkitzmiller FYI, for now I've updated the code to swallow exceptions. See https://github.com/SiftScience/sift-python/pull/34
all this methods return the requests.exceptions.RequestException exception instead of re raising it. Is it intended to be that way, it makes for very impractical API consumption