From ec070ac5d4450320f03c503d4435fe63445db67c Mon Sep 17 00:00:00 2001 From: andresgutgon Date: Wed, 18 Sep 2024 20:34:11 +0200 Subject: [PATCH] More debug logs on websockets not connecting from workers --- apps/websockets/src/server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/websockets/src/server.ts b/apps/websockets/src/server.ts index 0fd20b887..3d704ddc6 100644 --- a/apps/websockets/src/server.ts +++ b/apps/websockets/src/server.ts @@ -109,12 +109,14 @@ workers.use(async (socket, next) => { try { const token = socket.handshake.auth?.token if (!token) { + console.log('DEBUG: No token provided') return next(new Error('Authentication error: No token provided')) } const result = await verifyWorkerWebsocketToken(token) if (result.error) { + console.log('DEBUG: JWT verification failed for worker:', result.error) return next(new Error(`Authentication error: ${result.error.message}`)) }