diff --git a/src/lib/hooks/useOTAUpdates.ts b/src/lib/hooks/useOTAUpdates.ts index 9c57506060..466d032083 100644 --- a/src/lib/hooks/useOTAUpdates.ts +++ b/src/lib/hooks/useOTAUpdates.ts @@ -10,6 +10,7 @@ import { useUpdates, } from 'expo-updates' +import {isNetworkError} from '#/lib/strings/errors' import {logger} from '#/logger' import {isIOS} from '#/platform/detection' import {IS_TESTFLIGHT} from '#/env' @@ -145,8 +146,10 @@ export function useOTAUpdates() { } else { logger.debug('No update available.') } - } catch (e) { - logger.error('OTA Update Error', {error: `${e}`}) + } catch (err) { + if (!isNetworkError(err)) { + logger.error('OTA Update Error', {safeMessage: err}) + } } }, 10e3) }, []) @@ -154,8 +157,10 @@ export function useOTAUpdates() { const onIsTestFlight = React.useCallback(async () => { try { await updateTestflight() - } catch (e: any) { - logger.error('Internal OTA Update Error', {error: `${e}`}) + } catch (err: any) { + if (!isNetworkError(err)) { + logger.error('Internal OTA Update Error', {safeMessage: err}) + } } }, [])