@sentry/nextjs
Version:
Official Sentry SDK for Next.js
24 lines • 1.18 kB
TypeScript
/**
* Determines whether input is a Next.js not-found error.
* https://beta.nextjs.org/docs/api-reference/notfound#notfound
*/
export declare function isNotFoundNavigationError(subject: unknown): boolean;
/**
* Returns the HTTP status of a Next.js `forbidden()` (403) or `unauthorized()` (401) error, if input is one.
* https://nextjs.org/docs/app/api-reference/functions/forbidden
*/
export declare function getAuthInterruptStatusCode(subject: unknown): 401 | 403 | undefined;
/**
* Determines whether input is a Next.js redirect error.
* https://beta.nextjs.org/docs/api-reference/redirect#redirect
*/
export declare function isRedirectNavigationError(subject: unknown): boolean;
/**
* Determines whether input is one of the errors Next.js throws to steer rendering rather than to signal a failure.
*
* This mirrors the non-navigation half of Next.js' `unstable_rethrow`, which is the contract any code wrapping
* user land in a `try`/`catch` has to honor.
* https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow
*/
export declare function isPrerenderControlFlowError(subject: unknown): boolean;
//# sourceMappingURL=nextNavigationErrorUtils.d.ts.map