Errors
by default the response will be wrapped with try catch and InternalServerError
will be sent to response.
or you can throw custom error
#
Error Middlewareyou can define custom error middleware to handle route error. any express error middleware are also supported
#
Global Error handlerThe global middleware will be run on all routes
in config/middlewares/all.ts
#
Not Found Routewhen route is not found HttpError is thrown with status 404
you can catch the error by get('*')
route or by error middleware
in config/middlewares/all.ts
#
Error Stackyou can enable the stack error message in development