fmenis / express-error-handling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express error handling sample

Little project focused on Nodejs error handling through Express middlewares.

The goals are:

  • handle errors that can crash the node process (in the "let is crash" way)
  • define a set of standard lightweight erros that will be returned to the client (web app), hiding the complexity of the real error happened
  • log operational and programmers errors with a logger so that it is possible to reconstruct what happened

Disclaimer

No attention is made to topics such as validation, code structuring, databases, etc. Only error handling!

Routes

Get all users

Get one user

Create user

Update user

Delete user

About


Languages

Language:JavaScript 100.0%