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

404 and 500 error handling #43

Open
bobbysebolao opened this issue Aug 29, 2019 · 0 comments
Open

404 and 500 error handling #43

bobbysebolao opened this issue Aug 29, 2019 · 0 comments
Assignees

Comments

@bobbysebolao
Copy link

You can make your own middleware to deal with 404 and 500 errors.

  • A 404 error occurs when a user requests a resource or types in an endpoint that does not exist
  • A 500 error occurs when some server side logic goes fails (e.g. a database query fails, or

You can create 404.hbs and 500.hbs views and app.use them after all your routing logic in index.js, like in section 11 of the morning codealong we did on Sunday.

@g4ss4n g4ss4n self-assigned this Aug 29, 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

No branches or pull requests

2 participants