Closed Florian-A closed 12 months ago
[Nest] 755 - 11/13/2023, 5:01:29 PM ERROR [ExceptionsHandler]
Invalid `this.prisma.achievement.upsert()` invocation in
/app/dist/achievement/achievement.service.js:22:55
19 this.playerService = playerService;
20 }
21 async getAchieveById(id) {
→ 22 const achieve = await this.prisma.achievement.upsert(
Unique constraint failed on the fields: (`userId`)
PrismaClientKnownRequestError:
Invalid `this.prisma.achievement.upsert()` invocation in
/app/dist/achievement/achievement.service.js:22:55
19 this.playerService = playerService;
20 }
21 async getAchieveById(id) {
→ 22 const achieve = await this.prisma.achievement.upsert(
Unique constraint failed on the fields: (`userId`)
at Cn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6817)
at Cn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6206)
at Cn.request (/app/node_modules/@prisma/client/runtime/library.js:123:5926)
at async l (/app/node_modules/@prisma/client/runtime/library.js:128:9968)
at async AchievementService.getAchieveById (/app/dist/achievement/achievement.service.js:22:25)
at async ProfileService.getUserProfileById (/app/dist/profile/profile.service.js:34:25)
at async ProfileController.getMyProfile (/app/dist/profile/profile.controller.js:28:25)
at async /app/node_modules/@nestjs/core/router/router-execution-context.js:46:28
at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17
Supprimer les Logger.log aussi !!
To fix:
Game:
Parties a fix :
/app/dist/game/Room.class.js:70 if (players[0].score > players[1].score) {
[Nest] 765 - 11/13/2023, 4:05:00 PM ERROR [WsExceptionsHandler] Cannot read properties of undefined (reading 'password') TypeError: Cannot read properties of undefined (reading 'password') at UsersService.updateUser (/app/dist/users/users.service.js:123:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async UsersGateway.handleUpdateProfile (/app/dist/users/users.gateway.js:49:17)