From 407862a4e0e10ce2a035e4e5e76e26dde849aac1 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sat, 27 Jul 2024 21:04:28 +0530 Subject: Finish Discord activity implementation --- priv/static/room/displayState.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'priv/static/room') diff --git a/priv/static/room/displayState.js b/priv/static/room/displayState.js index 3a5e923..a2da229 100644 --- a/priv/static/room/displayState.js +++ b/priv/static/room/displayState.js @@ -9,7 +9,7 @@ fetch(STATE_URL) .then((response) => { if (!response.ok) { - throw new Error(`Error: fetching state returned ${response.status}`); + throw new Error(`Fetching room state failed with status code ${response.status}`); } return response.json(); }) @@ -17,7 +17,8 @@ const viewersConnected = json.viewersConnected; stateElement.dataset.text = `total viewers: ${viewersConnected}`; }) - .catch((_) => { + .catch((error) => { + console.error(error); stateElement.dataset.text = STATE_ELEMENT_INITIAL_TEXT; }); } -- cgit v1.2.3-57-g22cb