Skip to content

Conversation

@lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Jan 13, 2022

There are certain situations where _error is loaded before _app has had a chance to run. In those cases, we miss errors caught in _error, because the SDK has not yet initialized (which currently happens the first time _app runs). This injects the initialization code into _error as well, to avoid such problems.

(In order to not add extra code to the browser bundle, and because this has only shown up as a problem on the server side, for the moment this only does the injection when building the server bundle.)

Fixes #4168.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2022

size-limit report

Path Base Size (e92ad68) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.58 KB 19.59 KB +0.02% 🔺
@sentry/browser - CDN Bundle (minified) 62.5 KB 62.5 KB +0.01% 🔺
@sentry/browser - Webpack 22.11 KB 22.11 KB 0%
@sentry/browser - Webpack - gzip = false 75.59 KB 75.59 KB 0%
@sentry/react - Webpack 22.14 KB 22.14 KB 0%
@sentry/nextjs Client - Webpack 46.33 KB 46.33 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.31 KB 28.31 KB +0.01% 🔺

@lobsterkatie lobsterkatie force-pushed the kmclb-nextjs-inject-into-_error branch from 709ecce to 81313bb Compare January 18, 2022 19:22
@lobsterkatie lobsterkatie merged commit 656017a into master Jan 18, 2022
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-inject-into-_error branch January 18, 2022 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[nextjs] Custom _error page does not capture server data fetching/SSR errors with experimental-serverless-trace target

3 participants