You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [2]: requests.get('https://httpbin.org/status/500')
Out[2]: <Response [500]> # This is an object, not an raise error therefore not caught by try/except
You would need to raise from the response
response = requests.get(event.url, params=event.params, timeout=10)
In [4]: response.raise_for_status()
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
<ipython-input-4-46d4bf99ee16> in <module>()
----> 1 requests.get('https://httpbin.org/status/500').raise_for_status()
python3.6/site-packages/requests/models.py in raise_for_status(self)
937
938 if http_error_msg:
--> 939 raise HTTPError(http_error_msg, response=self)
940
941 def close(self):
HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: https://httpbin.org/status/500
The text was updated successfully, but these errors were encountered:
The default
EventDispatcher
only handles network related errors and ignores HTTP errors(500
,503
, etc) without any logging messagesHTTP errors in
requests
do not raise ExceptionsYou would need to raise from the response
The text was updated successfully, but these errors were encountered: