Nest: How to instantiate BaseExceptionFilter extension

Created on 4 Sep 2018  路  2Comments  路  Source: nestjs/nest

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[x ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

I've read the documentation here https://docs.nestjs.com/exception-filters but don't understand how to instantiate a class that extends the BaseExceptionFilter. I've seen the warning Filters that extend base classes have to be instantiated by the framework itself (don't manually create instances using new keyword). but can't see how to tell the framework to do the instantiation.

Apologies if i'm missing something really obvious.

question 馃檶

Most helpful comment

For example, in this way: @UseFilters(HttpExceptionFilter) (without new) 馃檪

All 2 comments

For example, in this way: @UseFilters(HttpExceptionFilter) (without new) 馃檪

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafal-rudnicki picture rafal-rudnicki  路  3Comments

mishelashala picture mishelashala  路  3Comments

yanshuf0 picture yanshuf0  路  3Comments

janckerchen picture janckerchen  路  3Comments

thohoh picture thohoh  路  3Comments