-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Middleware with Fastify cannot throw errors #2640
Comments
Please, provide a minimal repository which reproduces your issue. |
Hi @kamilmysliwiec, Our app is currently running in production with Express and we are trying to migrate to Fastify. However, we also have an issue with our app crashing with the error above. If have put together a simple app to demonstrate this issue. To test -
To test with middleware that throws an exception inside
To test with middleware that does not throw exception but still crashes the app
The app will crash with - UnhandledPromiseRejectionWarning: TypeError: response.status is not a function |
Please, use GitHub instead (not zip archive) |
@kamilmysliwiec Updated the issue |
Fixed in 6.6.2 :) |
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. |
Bug Report
When using Fastify and attempting to throw an error the request ends up hanging yielding the error below.
Current behavior
Input Code
Expected behavior
Expect the response to complete with the appropriate payload
Environment
Nest version: 6.5.3
The text was updated successfully, but these errors were encountered: