handle push token fetch failures
This commit is contained in:
@@ -120,7 +120,11 @@ async function getPushToken() {
|
|||||||
const granted = (await Notifications.getPermissionsAsync()).granted
|
const granted = (await Notifications.getPermissionsAsync()).granted
|
||||||
notyLogger.debug(`getPushToken`, {granted})
|
notyLogger.debug(`getPushToken`, {granted})
|
||||||
if (granted) {
|
if (granted) {
|
||||||
return Notifications.getDevicePushTokenAsync()
|
try {
|
||||||
|
return await Notifications.getDevicePushTokenAsync()
|
||||||
|
} catch (error) {
|
||||||
|
notyLogger.debug(`getPushToken: failed`, {safeMessage: error})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user