cnstll/ft_transcendAnce

[Bug] Backend error on channel service: delete password should be checked first

Closed this issue · 0 comments

Describe the bug

In channel's service, line 196, we delete password but it's optional in the dto. We should check first that it's present in the dto before deleting it.

Steps to reproduce

When entering a channel, the error flags:

dev-backend  | [Nest] 523  - 11/21/2022, 6:17:59 PM   ERROR [WsExceptionsHandler] Cannot convert undefined or null to object
dev-backend  | TypeError: Cannot convert undefined or null to object
dev-backend  |     at ChannelService.connectToChannel (/home/app/src/channel/channel.service.ts:196:5)
dev-backend  |     at ChannelGateway.connectToChannel (/home/app/src/channel/channel.gateway.ts:48:21)
dev-backend  |     at ChannelGateway.<anonymous> (/home/app/node_modules/@nestjs/websockets/context/ws-proxy.js:11:32)
dev-backend  |     at WebSocketsController.pickResult (/home/app/node_modules/@nestjs/websockets/web-sockets-controller.js:90:24)

Expected behavior

no error message in the backend

Environment

No response

OS

No response

Browser

No response

Version

No response

Additional context

No response

Relevant log output

No response