Unverified Commit fedcae42 authored by Hugo's avatar Hugo Committed by GitHub

Update custom-error-page for getServerSideProps (#41723)

`fetch` output type has `status` but no `statusCode`, see MDN https://developer.mozilla.org/en-US/docs/Web/API/Response/status


## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent 89355298
...@@ -74,7 +74,7 @@ import Error from 'next/error' ...@@ -74,7 +74,7 @@ import Error from 'next/error'
export async function getServerSideProps() { export async function getServerSideProps() {
const res = await fetch('https://api.github.com/repos/vercel/next.js') const res = await fetch('https://api.github.com/repos/vercel/next.js')
const errorCode = res.ok ? false : res.statusCode const errorCode = res.ok ? false : res.status
const json = await res.json() const json = await res.json()
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment