Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface OnUndefinedDecorator

Type of OnUndefined decorator

Hierarchy

  • OnUndefinedDecorator

Callable

  • __call(statusOrError: number | HttpError): any
  • Defines what to do on undefined return value

    example
    @Controller()
    export class TestController {
      @Get('/')
      @OnUndefined(404)
      index() {
      }
    
      @Get('/test')
      test() {
        return Result([ new OnUndefined(new NotFoundError()) ]);
      }
    }
    

    Parameters

    Returns any

Index

Constructors

Constructors

constructor

Generated using TypeDoc