Closed vahidvdn closed 3 years ago
Please provide a minimum reproduction repository.
@kamilmysliwiec Here you are: https://github.com/vahidvdn/typescript-starter Please run it and open http://localhost:3000/docs to run the API. Then you will see the error in console.
FYI: I guess this error happened after upgrading my node version. Please make sure you are using the latest version (14.x)
Your code is invalid.
Change this:
if (status != 500) super.catch(exception, host);
to this:
if (status != 500) {
return super.catch(exception, host);
}
@kamilmysliwiec Thank you. Btw, if you don't mind, I can contribute in docs and change it. (https://docs.nestjs.com/exception-filters#inheritance)
Bug Report
Current behavior
I have a
HttpExceptionFilter
class. I have the following logic:If I get any kind of exception other than 500 error, I get the following error in my console:
Expected behavior
Not to get any errors.
Environment