don't throw, but log OTA listener errors (#958)

This commit is contained in:
Ansh
2023-07-03 16:17:28 -07:00
committed by GitHub
parent 269c0687fd
commit 40a872612f
+4 -1
View File
@@ -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