Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ErrDecorator

Type of the Err decorator

Hierarchy

  • ErrDecorator

Callable

  • __call(): any
  • Injects the optional error from a middleware into controller handler

    example
    
    class ExampleController {
      @Post('/login')
      @Use((_req, _res, next) => next(Math.random() < .5 ? new Error('err') : null))
      index(@Err() err : any, @Res() res : Express.Response) {
      }
    }
    

    Returns any

Index

Constructors

Constructors

constructor

  • new ErrDecorator(): Err

Generated using TypeDoc