Skip to content

Commit e70b1f0

Browse files
Update content/exception-filters.md
1 parent c6719d5 commit e70b1f0

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

content/exception-filters.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -347,21 +347,7 @@ export class AllExceptionsFilter implements ExceptionFilter {
347347
}
348348
```
349349

350-
> warning **Warning** When combining an exception filter that catches everything with a filter that is bound to a specific type, the Catch-Anything filter should be declared first to allow the specific filter to correctly handle the bound type
351-
352-
353-
##### Catch-Anything Example
354-
355-
```typescript
356-
// wrong
357-
app.useGlobalFilters(new MySpecificFilter(), new CatchAllFilter())
358-
// right
359-
app.useGlobalFilters(new CatchAllFilter(), new MySpecificFilter())
360-
```
361-
362-
See [ISSUE-9696](https://github.com/nestjs/nest/issues/9696) for details.
363-
364-
350+
> warning **Warning** When combining an exception filter that catches everything with a filter that is bound to a specific type, the "Catch anything" filter should be declared first to allow the specific filter to correctly handle the bound type.
365351
#### Inheritance
366352

367353
Typically, you'll create fully customized exception filters crafted to fulfill your application requirements. However, there might be use-cases when you would like to simply extend the built-in default **global exception filter**, and override the behavior based on certain factors.

0 commit comments

Comments
 (0)