nest icon indicating copy to clipboard operation
nest copied to clipboard

@UseFilters() dont work in middleware

Open silvelo opened this issue 9 years ago • 5 comments

When @Middleware throw exception, my own @UserFilters doesnt catch the error, ExceptionsHandler is throw the error.

silvelo avatar Jun 23 '17 09:06 silvelo

Hey @silvelo ! Can you give us the code sample ?

thomrick avatar Jun 23 '17 18:06 thomrick

@ThomRick Hi I upload a repo with example https://github.com/silvelo/nestexception.

This server example contains two url to test both with fails, one its correct and the other not.

The first url fail in controller and my OwnfilterException catch the error, but the second the error was in middleware and my filterException doesnt catch

silvelo avatar Jun 23 '17 23:06 silvelo

Hey @silvelo, Thanks for reporting the issue. Let's update your @nestjs/core into 3.0.1 version.

kamilmysliwiec avatar Jun 24 '17 12:06 kamilmysliwiec

Thanks for quick reply .

silvelo avatar Jun 24 '17 12:06 silvelo

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.

lock[bot] avatar Sep 25 '19 12:09 lock[bot]