Rocky_Mountain_Vending/.pnpm-store/v10/files/6f/f75b58398dd31a1c2221b444ec717cb05b9df6aa1a093c5c306bcf74880c43875bbcce0bb2852bd2f7122d89b726a8c94ef45893cff6207d1ff13d89324dad
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

33 lines
No EOL
1.5 KiB
Text

import { HTTP_ERROR_FALLBACK_ERROR_CODE } from './http-access-fallback/http-access-fallback';
// TODO: Add `unauthorized` docs
/**
* @experimental
* This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)
* within a route segment as well as inject a tag.
*
* `unauthorized()` can be used in
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
*
*
* Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)
*/ const DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`;
export function unauthorized() {
if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {
throw Object.defineProperty(new Error(`\`unauthorized()\` is experimental and only allowed to be used when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", {
value: "E411",
enumerable: false,
configurable: true
});
}
const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", {
value: "E394",
enumerable: false,
configurable: true
});
error.digest = DIGEST;
throw error;
}
//# sourceMappingURL=unauthorized.js.map