Check for network error before reporting push token issue (#9258)
This commit is contained in:
@@ -7,6 +7,7 @@ import debounce from 'lodash.debounce'
|
|||||||
|
|
||||||
import {PUBLIC_APPVIEW_DID, PUBLIC_STAGING_APPVIEW_DID} from '#/lib/constants'
|
import {PUBLIC_APPVIEW_DID, PUBLIC_STAGING_APPVIEW_DID} from '#/lib/constants'
|
||||||
import {logger as notyLogger} from '#/lib/notifications/util'
|
import {logger as notyLogger} from '#/lib/notifications/util'
|
||||||
|
import {isNetworkError} from '#/lib/strings/errors'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useAgeAssuranceContext} from '#/state/ageAssurance'
|
import {useAgeAssuranceContext} from '#/state/ageAssurance'
|
||||||
import {type SessionAccount, useAgent, useSession} from '#/state/session'
|
import {type SessionAccount, useAgent, useSession} from '#/state/session'
|
||||||
@@ -47,7 +48,9 @@ async function _registerPushToken({
|
|||||||
|
|
||||||
notyLogger.debug(`registerPushToken: success`)
|
notyLogger.debug(`registerPushToken: success`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notyLogger.error(`registerPushToken: failed`, {safeMessage: error})
|
if (!isNetworkError(error)) {
|
||||||
|
notyLogger.error(`registerPushToken: failed`, {safeMessage: error})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user