Open ab opened 3 years ago
@jtroussard @Lukasa @sigmavirus24 @singingwolfboy
This could be considered a revised PR for #217.
I'm pretty sure tests for pypy3.5-6.0
are failing on master. The error regarding Python cryptography and OpenSSL 1.0.2 doesn't seem related to my code changes at all.
Tests pass on all other Python versions.
Please don't randomly ping people who don't work on the project
Please don't randomly ping people who don't work on the project
Sorry about that, you had weighed in on the linked PR.
+1 for this - I'm seeing confusing exceptions when the upstream provider returns a generic error response (Nginx's bad gateway error page for example) so I would recommend merging this too.
The tests are failing for an unrelated error and would most likely fail on master
too. Depending on how the project wants to fix this we could either upgrade to a newer OpenSSL version which the cryptography
module now requires or set the CRYPTOGRAPHY_ALLOW_OPENSSL_102
environment variable to skip the warning and try using the outdated OpenSSL anyway.
Is this PR still being considered? I came across the same need and would love for this feature to move forward.
It is very confusing to raise a MissingTokenError when the server has returned an HTTP server error.
Instead, raise requests.exceptions.HTTPError if the server has returned an HTTP 5XX server error.
Prior PR conversation in PR #217 indicates that the maintainers do not want to raise on 4XX errors due to certain providers using those responses to send data. So we need a custom handler with a slight variation on the built-in requests.models.Response.raise_for_status().