Skip to content

docs: Rename Error component to ErrorPage#89284

Merged
eps1lon merged 1 commit intovercel:canaryfrom
mintydev789:patch-3
Jan 30, 2026
Merged

docs: Rename Error component to ErrorPage#89284
eps1lon merged 1 commit intovercel:canaryfrom
mintydev789:patch-3

Conversation

@mintydev789
Copy link
Contributor

A component shouldn't be called Error, because that is the native object for Javascript errors.

A component shouldn't be called `Error`, because that is the native object for Javascript errors.
@nextjs-bot nextjs-bot added the Documentation Related to Next.js' official documentation. label Jan 30, 2026
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 30, 2026

Allow CI Workflow Run

  • approve CI run for commit: 3798466

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@eps1lon eps1lon changed the title Rename Error component to ErrorPage docs: Rename Error component to ErrorPage Jan 30, 2026
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to avoid shadowing e.g. when you'd attempt to throw new Error in that Component. You wouldn't throw an error but the Component.

cc @icyJoseph for visibility in case we have more pages shading JS native vars.

@eps1lon eps1lon merged commit 91bf049 into vercel:canary Jan 30, 2026
113 of 120 checks passed
@icyJoseph
Copy link
Member

@mintydev789 thanks for that! - Here's another one https://nextjs.org/docs/app/api-reference/file-conventions/error#error

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants