Skip to content

Commit ac05aa7

Browse files
committed
update check for not found navigation error
1 parent 0aadc9b commit ac05aa7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/nextjs/src/common/nextNavigationErrorUtils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import { isError } from '@sentry/utils';
55
* https://beta.nextjs.org/docs/api-reference/notfound#notfound
66
*/
77
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+
((subject as Error & { digest?: unknown }).digest === 'NEXT_NOT_FOUND' ||
11+
// this was introduced in 15.0.4-canary.18: https://github.com/vercel/next.js/pull/72774
12+
(subject as Error & { digest?: unknown }).digest === 'NEXT_HTTP_ERROR_FALLBACK;404')
13+
);
914
}
1015

1116
/**

0 commit comments

Comments
 (0)