question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK client silently ignores capturing if server responds with 413 (big payload)

See original GitHub issue

Greetings 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
untitakercommented, Apr 2, 2019

FYI we’re going to do some general work on trimming local variables etc in the SDK in the next two weeks

0reactions
antonpirkercommented, Mar 2, 2022

Because there is data trimming in the Python SDK available, I will close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is a 413 Request Entity Too Large Error & How to Fix It
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when...
Read more >
413 Payload Too Large - HTTP - MDN Web Docs
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server...
Read more >
Error 413 payload.too.large - Genesys Cloud Developer Center
Client.V2.Client.ApiException. The API query interval is only 4 hours, on the same day. Why could it be giving me this type of error?...
Read more >
Amazon SageMaker - Developer Guide - dbSeer
Use the SDKs to programmatically start a model training job and host the model in Amazon SageMaker. SDK clients authenticate your requests by...
Read more >
Spring Cloud
If you need to use newer version of AWS SDK than one configured by Spring Cloud ... GatewayFilter factory sets the response status...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found