From 63651a63de417e5d1fa8ed068fc891ea4dbba0db Mon Sep 17 00:00:00 2001 From: Faris Masad Date: Sun, 21 Aug 2022 19:30:18 -0700 Subject: [PATCH] Add note about using the /_error page directly to custom error page article (#39671) See https://github.com/vercel/next.js/issues/39144 It's not completely clear that `/_error` should not be used as a normal page. Added a note under `Caveats` in the custom error page article --- docs/advanced-features/custom-error-page.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/advanced-features/custom-error-page.md b/docs/advanced-features/custom-error-page.md index e3f4b2ddf79..6b3a2b860b1 100644 --- a/docs/advanced-features/custom-error-page.md +++ b/docs/advanced-features/custom-error-page.md @@ -98,3 +98,4 @@ If you have a custom `Error` component be sure to import that one instead. `next ### Caveats - `Error` does not currently support Next.js [Data Fetching methods](/docs/basic-features/data-fetching.md) like [`getStaticProps`](/docs/basic-features/data-fetching/get-static-props.md) or [`getServerSideProps`](/docs/basic-features/data-fetching/get-server-side-props.md). +- `_error`, like `_app`, is a reserved pathname. `_error` is used to define the customized layouts and behaviors of the error pages. `/_error` will render 404 when accessed directly via [routing](/docs/routing/introduction) or rendering in a [custom server](/docs/advanced-features/custom-server).