File tree 2 files changed +7
-1
lines changed
dev-packages/e2e-tests/test-applications/nextjs-turbo
packages/nextjs/src/common
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 46
46
"extends" : " ../../package.json"
47
47
},
48
48
"sentryTest" : {
49
+ "optional" : true ,
49
50
"optionalVariants" : [
50
51
{
51
52
"build-command" : " test:build-canary" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ import { isError } from '@sentry/core';
5
5
* https://beta.nextjs.org/docs/api-reference/notfound#notfound
6
6
*/
7
7
export function isNotFoundNavigationError ( subject : unknown ) : boolean {
8
- return isError ( subject ) && ( subject as Error & { digest ?: unknown } ) . digest === 'NEXT_NOT_FOUND' ;
8
+ return (
9
+ isError ( subject ) &&
10
+ [ 'NEXT_NOT_FOUND' , 'NEXT_HTTP_ERROR_FALLBACK;404' ] . includes (
11
+ ( subject as Error & { digest ?: unknown } ) . digest as string ,
12
+ )
13
+ ) ;
9
14
}
10
15
11
16
/**
You can’t perform that action at this time.
0 commit comments