I'm facing an issue with the HttpException filter when deliberately sending invalid data to the server. The error occurs when sending the following curl request:
curl -X POST http://127.0.0.1:3000/test -H "Content-Type: application/json" -d "{\"h\":\"}"
Or with any data that doesn't comply with the application/json format.
Describe the bug
I encountered the
I18nContext.current()
returningundefined
:You can access my entire codebase here (https://github.com/vqhdev/nestjs-i18n-error)
Reproduction
I'm facing an issue with the
HttpException
filter when deliberately sending invalid data to the server. The error occurs when sending the followingcurl
request:Or with any data that doesn't comply with the application/json format.
System Info
Used Package Manager
npm
Validations