Skip to content

413 Request Entity Too Large #2798

Closed
Closed

Description

@davidpaley

Hi,

I am working with "@sentry/react": "^5.20.1" and Next JS ("next": "^9.4.4").

I am working with the default configuration for React:

import * as Sentry from '@sentry/react'
.......
Sentry.init({
  dsn:
    'https://457703580b544d42a015013b0ef5436f@o429772.ingest.sentry.io/5377002',
})

Some errors are logged ok in Sentry, however when I tried, for example, to throw an error like throw new Error('testing Sentry!'), I get the response: 413 Request Entity Too Large.

image

Activity

  1. davidpaley commented on Aug 5, 2020

    @davidpaley
    Author

    Ok, I could resolve this filtering the different breadcrumbs of the object it sends to entry:

    Sentry.init({
      dsn:
        'dns_url',
      beforeBreadcrumb(breadcrumb, hint) {
        if (breadcrumb.category === 'console') {
          return null
        }
        return breadcrumb
      },
    })
    

    In my case, it sends too many breadcrumbs with the category 'console' so the error object serialized to a string was greater than the maximum size.

  2. avalanche1 commented on Dec 12, 2021

    @avalanche1

    This is absurd, that it would drop the reports altogether, SILENTLY.

  3. andirsun commented on Jan 9, 2023

    @andirsun

    For me was to reduce normalizeDepth from 10 to 3 (default value for next js).

    Before

    Sentry.init({
        dsn: config.SENTRY_DSN,
        environment: config.SENTRY_ENV,
       normalizeDepth: 10,
       ...
      })
    

    After

    Sentry.init({
        dsn: config.SENTRY_DSN,
        environment: config.SENTRY_ENV,
        ...
      })
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions