-
-
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
Empty @Body() ends up with error 500 #734
Comments
Are you using any ValidationPipe ? |
Oh. Yes I am.
I guess it's the right way to do so. That said, I'm using the one offered by Nest. Should it be done directly there? |
@maxime1992 it's perfectly fine. |
Fixed in the v5.1.0 |
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. |
I'm submitting a...
Current behavior
Making a POST without passing any body ends up with an error 500 and the following stacktrace:
Note: I'm using
class-transformer
andclass-validator
. My DTO is like that for example:Expected behavior
If an argument is not optional and is not present when a request arrives, the app shouldn't crash and end up with a 500 error.
Minimal reproduction of the problem with instructions
CF code above
Environment
The text was updated successfully, but these errors were encountered: