SDK client silently ignores capturing if server responds with 413 (big payload)
See original GitHub issueGreetings fellows,
we recently by accident discovered that we are not getting all exceptions in Sentry.
Current versions
Python 3.6.7 Django 2.1.7 Celery 4.1.1 Sentry SDK 0.7.2
Current behavior
If the exception will have a big context (I do not know the exact limits of it), Sentry server (sentry.io) responds with HTTP code 413.
The code in sentry_sdk.transport.HttpTransport#_send_event
is raising ValueError("Unexpected status code")
in this case. If you do not set debug=True
during the Sentry SDK initialization, you would not know that and you would be completely unaware of having issues in the code.
This issue today took us some time to discover.
Expected behaviour (IMHO)
I believe, Sentry SDK should try to do its best to send exceptions. In case of a too big payload, it maybe could retry the request without the full payload, but just an exception name with some note “Your context is too big, could not be shown” or something like this. In the worst case, we should get this kind of events in logs even without debug turned off.
What do you think?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top GitHub Comments
FYI we’re going to do some general work on trimming local variables etc in the SDK in the next two weeks
Because there is data trimming in the Python SDK available, I will close this issue.