You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should get `{"statusCode":500,"message":"Internal server error"}``
In logs, you should see
[Nest] 99748 - 25/02/2024, 21:58:19 ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'name')
TypeError: Cannot read properties of undefined (reading 'name')
at AlarmsController.create (/Users/matias/projects/advanced-architecture/src/alarms/presenters/http/alarms.controller.ts:14:47)
at /Users/matias/projects/advanced-architecture/node_modules/@nestjs/core/router/router-execution-context.js:38:29
at InterceptorsConsumer.intercept (/Users/matias/projects/advanced-architecture/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:11:20)
at /Users/matias/projects/advanced-architecture/node_modules/@nestjs/core/router/router-execution-context.js:46:60
at /Users/matias/projects/advanced-architecture/node_modules/@nestjs/core/router/router-proxy.js:9:23
at Layer.handle [as handle_request] (/Users/matias/projects/advanced-architecture/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/matias/projects/advanced-architecture/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/Users/matias/projects/advanced-architecture/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/Users/matias/projects/advanced-architecture/node_modules/express/lib/router/layer.js:95:5)
at /Users/matias/projects/advanced-architecture/node_modules/express/lib/router/index.js:284:15
Hi @matiasgarcia , can you try upgrading the 'reflect-metadata' package to '^0.2' and see if the issue persists?
There was a bug reported that affected validation pipes regarding this package.
Is there an existing issue for this?
Current behavior
While doing the Advanced Architectures course, using
nest 9.4.2
it seems that ValidationPipe is not executed.Minimum reproduction code
https://github.com/matiasgarcia/nestjs-advanced-architecture
Steps to reproduce
npm run start:dev
curl -X POST http://localhost:3000/alarms -H "Content-Type: application/json" -d '{"name": "Test Alarm", "severity": "high"}'
In logs, you should see
Expected behavior
Request should be processed successfully
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
9.0.0
Packages versions
Node.js version
20
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: