joshdholtz / Sentry-Android

[Deprecated] Use official "raven-java" library
https://github.com/getsentry/sentry-java
MIT License
180 stars 48 forks source link

Too large request #24

Closed spidfire closed 7 years ago

spidfire commented 9 years ago

There seems to be a limit to how big the requests can be Is there a way to limit the data ?

D/Sentry  (10193): SendEvent - 413 <html>
D/Sentry  (10193): <head><title>413 Request Entity Too Large</title></head>
D/Sentry  (10193): <body bgcolor="white">
D/Sentry  (10193): <center><h1>413 Request Entity Too Large</h1></center>
D/Sentry  (10193): <hr><center>nginx</center>
D/Sentry  (10193): </body>
D/Sentry  (10193): </html>
spidfire commented 9 years ago

It only occurs if you have a recursive loop problem (stack overflow) I've fixed it by adding in getStackTrace a counter plus a break after 50 rows of the stacktrace

joshdholtz commented 9 years ago

@spidfire Yikes, I have never personally seen that before. Did you have a PR for the 50 rows? If not, I can work on adding that into the library :grin:

spidfire commented 9 years ago

Not really a pull request but these are the parts:

public static JSONObject getStackTrace(Throwable t) throws JSONException {
    int count = 0;
    ....
    for(....) {
      ......
    count++;
    if(count > 50){
      break;
      }
    }
joshdholtz commented 7 years ago

Closing this due to inactivity