about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-07-03 16:17:28 -0700
committerGitHub <noreply@github.com>2023-07-03 18:17:28 -0500
commit40a872612f6429fad90167ff0236df2a66fb6fd0 (patch)
tree4deda6883011b91c92fbf4d5eecf3bed70cfb770
parent269c0687fd19c68359b4b6c436c9e909e6610220 (diff)
downloadvoidsky-40a872612f6429fad90167ff0236df2a66fb6fd0.tar.zst
don't throw, but log OTA listener errors (#958)
-rw-r--r--src/lib/hooks/useOTAUpdate.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/hooks/useOTAUpdate.ts b/src/lib/hooks/useOTAUpdate.ts
index ae6035223..5155a808f 100644
--- a/src/lib/hooks/useOTAUpdate.ts
+++ b/src/lib/hooks/useOTAUpdate.ts
@@ -42,7 +42,10 @@ export function useOTAUpdate() {
     (event: Updates.UpdateEvent) => {
       store.log.debug('useOTAUpdate: Listening for update...')
       if (event.type === Updates.UpdateEventType.ERROR) {
-        throw new Error(event.message)
+        store.log.error(
+          'useOTAUpdate: Error while listening for update',
+          event.message,
+        )
       } else if (event.type === Updates.UpdateEventType.NO_UPDATE_AVAILABLE) {
         // Handle no update available
         // do nothing