File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -302,11 +302,13 @@ const MultiversalAppBootstrap: React.FunctionComponent<Props> = (props): JSX.Ele
302302 } ) ;
303303 }
304304 } else {
305- // XXX Opinionated: Record an exception in Sentry for 404, if you don't want this then uncomment the below code
306- const err = new Error ( `Page not found (404) for "${ router ?. asPath } "` ) ;
305+ if ( ! process . env . IS_SERVER_INITIAL_BUILD ) { // Avoids capturing false-positive 404 pages when building the 404 page
306+ // XXX Opinionated: Record an exception in Sentry for 404, if you don't want this then uncomment the below code
307+ const err = new Error ( `Page not found (404) for "${ router ?. asPath } "` ) ;
307308
308- logger . warn ( err ) ;
309- Sentry . captureException ( err ) ;
309+ logger . warn ( err ) ;
310+ Sentry . captureException ( err ) ;
311+ }
310312 }
311313
312314 const i18nextInstance : i18n = i18nextLocize ( lang , i18nTranslations ) ; // Apply i18next configuration with Locize backend
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ if (process.env.SENTRY_DSN) {
4444 scope . setTag ( 'nodejsAWS' , process . env . AWS_EXECUTION_ENV || null ) ; // Optional - Available on production environment only
4545 scope . setTag ( 'memory' , process . env . AWS_LAMBDA_FUNCTION_MEMORY_SIZE || null ) ; // Optional - Available on production environment only
4646 scope . setTag ( 'runtimeEngine' , isBrowser ( ) ? 'browser' : 'server' ) ;
47+ scope . setTag ( 'isServerInitialBuild' , process . env . IS_SERVER_INITIAL_BUILD || '0' ) ;
4748 } ) ;
4849} else {
4950 if ( process . env . NODE_ENV !== 'test' ) {
You can’t perform that action at this time.
0 commit comments