Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Exceptions are not handled in cascade way #729
I'm submitting a...
Annotated controller API method by @UseFilters(NotFoundExceptionFilter) is ignored and used is a global exception handler. After global exception filter is commented out, NotFoundExceptionFilter works as expected.
Controller annotated exception filters should have higher priority than global exception filter.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
I want to have global exception handler for any exception, and I want to override exception handler for just specific one controller for one exception type.
I think to resolve that issue, filters array used in invokeCustomFilters method in exceptions-handler.ts class should be reversed while it is initialized in setCustomFilters method in the same class. I am not sure if this change won't cause any additional problems, please correct me if I am wrong.