Skip to main content
Module

x/oak_nest/mod.ts>UseFilters

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
function UseFilters
import { UseFilters } from "https://deno.land/x/oak_nest@v3.0.1/mod.ts";

Decorator that binds exception filters to the scope of the controller or method, depending on its context.

When @UseFilters is used at the controller level, the filter will be applied to every handler (method) in the controller.

When @UseFilters is used at the individual handler level, the filter will apply only to that specific method.

Parameters

...filters: ExceptionFilters

exception filter instance or class, or a list of exception filter instances or classes.

Returns

MethodDecorator & ClassDecorator