airbrake / airbrake-python

Airbrake Python
MIT License
51 stars 24 forks source link

handle 420 status code #90

Closed phumpal closed 3 years ago

phumpal commented 6 years ago

If a client sends too many requests Airbrake will first sample these requests, drop some errors and return a 420.

requests does not currently support an HTTP 420 response code which causes the airbrake-python notifier to error here and here

HTTPError: 420 Client Error: status code 420 for url: https://airbrake.io/api/v3/projects/PROJECT_ID/notices?key=API_KEY
Logged from file test.py, line 12

We should handle this on the client side.

phumpal commented 3 years ago

Airbrake no longer returns a 420