From 87ef0c56ee7c49dc4b180fd71ce236480444ae51 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 19 Jul 2020 17:08:08 -0600 Subject: [PATCH] Fix API error logging --- backend/src/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/api.ts b/backend/src/api.ts index bde47ef..c0fcf50 100644 --- a/backend/src/api.ts +++ b/backend/src/api.ts @@ -190,7 +190,7 @@ export class Session { }; logBadMessage = (msg: any) => { - this.log(`Got malformed message from client: ${msg}`); + this.log(`Got malformed message from client: ${JSON.stringify(msg)}`); }; receive = async (event: string) => { @@ -202,7 +202,7 @@ export class Session { try { msg = JSON.parse(event); } catch (err) { - this.log(`Failed to parse message from client: ${msg}`); + this.log(`Failed to parse message from client: ${event}`); return; } switch (msg && msg.event) {