Closed TitouanS31 closed 3 weeks ago
You should be able to get the error information from the exception that is raised:
try:
# make call
except RequestError as foo:
status_code = foo.req.status_code
Thank you, I did not see the req
attribute.
I would like to add a way to retrieve the status code from
RequestError
to handle these exceptions differently, depending on their status. As a concrete example, I want to silently catch some 504 errors, since they do not seem to be a real problem (cf. #23).