Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default Error status code to 404 (#6276) #61

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

rajendraarora16
Copy link
Owner

  • Set default Error status code to 404

This is an appropriate default behavior because:

  1. When the server encounters an error, the err property is set.
  2. When the client-side application crashes, the err property is set.

This means the "only" way to render the /_error page without an error
is when a page is not found (special condition).

Fixes vercel#6243
Closes vercel#5437

  • Add new integration test for client side 404

  • single quotes

  • Remove unused variable

  • Standard needs to go away

  • Whoops

  • Check for null status code in res and err

  • Only check response for valid statusCode

* Set default `Error` status code to 404

This is an appropriate default behavior because:

1. When the server encounters an error, the `err` property is set.
2. When the client-side application crashes, the `err` property is set.

This means the "only" way to render the `/_error` page without an error
is when a page is not found (special condition).

Fixes #6243
Closes #5437

* Add new integration test for client side 404

* single quotes

* Remove unused variable

* Standard needs to go away

* Whoops

* Check for null status code in res and err

* Only check response for valid statusCode
@rajendraarora16 rajendraarora16 merged commit 369fb5f into rajendraarora16:canary Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants