Skip to content

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 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
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

4 participants