-
Notifications
You must be signed in to change notification settings - Fork 10
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
Exceptions are irrecoverable when using get_resource(..., iterate=True)
#11
Comments
bmwilly
added a commit
to contiamo/api-python
that referenced
this issue
Mar 14, 2018
If a request results in a non-200 status code, raise the exception instead of returning a `requests.Response`. Fixes usabilla#11
Going even further, I think a bad response should always be raised, instead of having |
bmwilly
added a commit
to contiamo/api-python
that referenced
this issue
Mar 14, 2018
If a request results in a non-200 status code, raise the exception instead of returning a `requests.Response`. Fixes usabilla#11
bmwilly
added a commit
to contiamo/api-python
that referenced
this issue
Mar 15, 2018
If a request results in a non-200 status code, raise the exception instead of returning a `requests.Response`. Fixes usabilla#11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since
![image](https://user-images.githubusercontent.com/3588399/37404038-f5ed80ae-2790-11e8-9da7-4521bcb94ea8.png)
item_iterator
returns an empty iterator when an exception is encountered, there is no way to recover the HTTP error that was raised:This behavior is confusing and makes code difficult to debug. I think in this case,
item_iterator
should just raise the exception that occurs.The text was updated successfully, but these errors were encountered: