瀏覽代碼

fix(websockets): add response debug on websockets sending

Karol Sójko 1 年之前
父節點
當前提交
8f96f0ed7a
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/websockets/src/Infra/WebSockets/WebSocketsClientMessenger.ts

+ 3 - 1
packages/websockets/src/Infra/WebSockets/WebSocketsClientMessenger.ts

@@ -34,7 +34,9 @@ export class WebSocketsClientMessenger implements ClientMessengerInterface {
           (status: number) => status >= 200 && status < 500,
       })
       if (response.status !== 200) {
-        this.logger.error(`Could not send message to connection ${connectionUuid} for user ${userUuid}`)
+        this.logger.error(
+          `Could not send message to connection ${connectionUuid} for user ${userUuid}. Response status code: ${response.status}. Response body: ${response.data}`,
+        )
       }
     }
   }