Shuta-syd / 42-ft_transcendence

This project is about creating a website for the mighty Pong contest
1 stars 1 forks source link

[Game] Invite IDを入れてEnterをするとエラーが起きる #343

Closed NIhkCK closed 1 year ago

NIhkCK commented 1 year ago

機能概要

Invite IDを入れて、エンターを押すと不定期でエラーが起こる。 エラーは以下の通り。

backend | [Nest] 80 - 05/02/2023, 8:29:06 AM ERROR [ExceptionsHandler] backend | Invalid this.prisma.inviteGame.update() invocation in backend | /backend/dist/game/game.service.js:141:51 backend | backend | 138 return IscorrectRoomId; backend | 139 } backend | 140 exports.NameToInviteRoomIdDic[guestDto.name] = guestDto.roomId; backend | → 141 const game = await this.prisma.inviteGame.update( backend | Unique constraint failed on the fields: (player2) backend | Error: backend | Invalid this.prisma.inviteGame.update() invocation in backend | /backend/dist/game/game.service.js:141:51 backend | backend | 138 return IscorrectRoomId; backend | 139 } backend | 140 exports.NameToInviteRoomIdDic[guestDto.name] = guestDto.roomId; backend | → 141 const game = await this.prisma.inviteGame.update( backend | Unique constraint failed on the fields: (player2) backend | at pn.handleRequestError (/backend/node_modules/@prisma/client/runtime/library.js:176:6477) backend | at pn.handleAndLogRequestError (/backend/node_modules/@prisma/client/runtime/library.js:176:5907) backend | at pn.request (/backend/node_modules/@prisma/client/runtime/library.js:176:5786) backend | at async PrismaService._request (/backend/node_modules/@prisma/client/runtime/library.js:179:10484) backend | at async GameService.assignGuest (/backend/dist/game/game.service.js:141:22) backend | at async /backend/node_modules/@nestjs/core/router/router-execution-context.js:46:28 backend | at async /backend/node_modules/@nestjs/core/router/router-proxy.js:9:17