Skip to content

Commit 7034b0d

Browse files
authored
docs: clarify on where exception filters can be used
1 parent 330ddd6 commit 7034b0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/exception-filters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ async create(createCatDto) {
260260

261261
> info **Hint** Prefer applying filters by using classes instead of instances when possible. It reduces **memory usage** since Nest can easily reuse instances of the same class across your entire module.
262262
263-
In the example above, the `HttpExceptionFilter` is applied only to the single `create()` route handler, making it method-scoped. Exception filters can be scoped at different levels: method-scoped, controller-scoped, or global-scoped. For example, to set up a filter as controller-scoped, you would do the following:
263+
In the example above, the `HttpExceptionFilter` is applied only to the single `create()` route handler, making it method-scoped. Exception filters can be scoped at different levels: method-scoped of the controller/resolver/gateway, controller-scoped, or global-scoped.
264+
For example, to set up a filter as controller-scoped, you would do the following:
264265

265266
```typescript
266267
@@filename(cats.controller)

0 commit comments

Comments
 (0)