mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
Merge pull request #923 from mvanhorn/osc/905-catch-error-handling
fix: add error logging to empty catch blocks in useMessagesElectric
This commit is contained in:
commit
354d80bf7a
1 changed files with 8 additions and 8 deletions
|
|
@ -57,8 +57,8 @@ export function useMessagesElectric(
|
|||
handle.initialSyncPromise,
|
||||
new Promise((resolve) => setTimeout(resolve, 3000)),
|
||||
]);
|
||||
} catch {
|
||||
// Timeout
|
||||
} catch (err) {
|
||||
console.warn("[useMessagesElectric] Sync timeout:", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -70,8 +70,8 @@ export function useMessagesElectric(
|
|||
syncHandleRef.current = handle;
|
||||
await fetchMessages();
|
||||
await setupLiveQuery();
|
||||
} catch {
|
||||
// Sync failed
|
||||
} catch (err) {
|
||||
console.warn("[useMessagesElectric] Sync failed:", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,8 +88,8 @@ export function useMessagesElectric(
|
|||
if (mounted && result.rows) {
|
||||
handleMessagesUpdate(result.rows);
|
||||
}
|
||||
} catch {
|
||||
// Query failed
|
||||
} catch (err) {
|
||||
console.warn("[useMessagesElectric] Query failed:", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,8 +130,8 @@ export function useMessagesElectric(
|
|||
liveQueryRef.current = liveQuery;
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Live query failed
|
||||
} catch (err) {
|
||||
console.warn("[useMessagesElectric] Live query failed:", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue