diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2024-07-27 15:34:28 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2024-07-27 15:34:28 +0000 |
commit | 407862a4e0e10ce2a035e4e5e76e26dde849aac1 (patch) | |
tree | db8fe1c95672d31621c6bd5fe545cab5497f18df /priv/static/room/displayState.js | |
parent | cd794243a5bba358d995e26ba024268e7d5d3f85 (diff) | |
download | mediasync-407862a4e0e10ce2a035e4e5e76e26dde849aac1.tar mediasync-407862a4e0e10ce2a035e4e5e76e26dde849aac1.tar.gz mediasync-407862a4e0e10ce2a035e4e5e76e26dde849aac1.zip |
Finish Discord activity implementation
Diffstat (limited to 'priv/static/room/displayState.js')
-rw-r--r-- | priv/static/room/displayState.js | 5 |
1 files changed, 3 insertions, 2 deletions
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; }); } |