next.js
ddbd288f - fix: scope "Pages Router only" comment to default export in next/error (#92566)

Commit
152 days ago
fix: scope "Pages Router only" comment to default export in next/error (#92566) ### What? Clarifies the misleading `// Pages Router only` comment at the top of `packages/next/error.d.ts` and `packages/next/src/api/error.ts`. ### Why? The blanket comment implies the entire `next/error` module is Pages Router only. However, `unstable_catchError` is a named export from the same module that works in App Router Client Components (it's loaded from `client/components/catch-error`). Developers and AI agents reading the file would distrust or skip the import based on the top-level comment. ### How? Changed the comment from `// Pages Router only` to `// Default export is Pages Router only` in both files, scoping it accurately to just the `Error` default export.
Author
Parents
Loading