Type of the Err decorator
Injects the optional error from a middleware into controller handler
class ExampleController { @Post('/login') @Use((_req, _res, next) => next(Math.random() < .5 ? new Error('err') : null)) index(@Err() err : any, @Res() res : Express.Response) { } }
Generated using TypeDoc
Type of the Err decorator