aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-25 17:16:32 -0500
committerJP Dillingham <jp@dillingham.me>2026-10-25 17:16:32 -0500
commit2d2f0f67716a61b5044ce8499bf82c8554fbe360 (patch)
tree7564351bd38c61aa4350ef648b82a80f9e80160a /src/web
parent7e00ec468938b563460df76efa9dd239f2d2cceb (diff)
downloadslskd-2d2f0f67716a61b5044ce8499bf82c8554fbe360.tar.gz
trap errors fetching conversations
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/components/Chat/Chat.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/web/src/components/Chat/Chat.jsx b/src/web/src/components/Chat/Chat.jsx
index 9224fb30..4fcb44ed 100644
--- a/src/web/src/components/Chat/Chat.jsx
+++ b/src/web/src/components/Chat/Chat.jsx
@@ -60,7 +60,13 @@ class Chat extends Component {
this.setState(
{
active: sessionStorage.getItem(activeChatKey) || '',
- interval: window.setInterval(this.fetchConversations, 5_000),
+ interval: window.setInterval(async () => {
+ try {
+ await this.fetchConversations();
+ } catch (error) {
+ console.error(error);
+ }
+ }, 5_000),
},
async () => {
await this.fetchConversations();
@@ -113,7 +119,6 @@ class Chat extends Component {
// check to see if the active chat is still active
// this will happen whenever a chat is closed/removed
if (activeConversation) {
- console.log('active?', activeConversation);
// *before* fetching messages, ack any unacked messages
// for the active chat
if (activeConversation.hasUnAcknowledgedMessages === true) {