Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

All errors are treated as a 404 #1

Closed
kyle-mccarthy opened this issue Oct 22, 2018 · 1 comment
Closed

All errors are treated as a 404 #1

kyle-mccarthy opened this issue Oct 22, 2018 · 1 comment

Comments

@kyle-mccarthy
Copy link
Owner

Originally discussed in nestjs/nest#1122 (comment)

@kyle-mccarthy
Copy link
Owner Author

@rahulparekh I have updated the example to properly handle errors that are not 404s. You can view the changes in 121bf79 to update your starter.

Basically, if the err.response isn't set on the error, it likely didn't originate from some user action and should be considered an internal server error. Knowing this we can call Nextjs error handler.

However, the original render service didn't have access to that so I have updated the service, added the new error renderer to the filter constructor and passed it in when it is instatiated in the main file..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant