Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/src/filter.ts>UseFilters

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
function UseFilters
import { UseFilters } from "https://deno.land/x/deno_nest@v3.6.0/src/filter.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