From 422abf37293be550e4b3928fffedc166b4b9e301 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 7 Sep 2026 11:57:56 +0300 Subject: [PATCH] handle push token fetch failures --- src/lib/notifications/notifications.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index 5acc6ab06d..be2b957d21 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -120,7 +120,11 @@ async function getPushToken() { const granted = (await Notifications.getPermissionsAsync()).granted notyLogger.debug(`getPushToken`, {granted}) if (granted) { - return Notifications.getDevicePushTokenAsync() + try { + return await Notifications.getDevicePushTokenAsync() + } catch (error) { + notyLogger.debug(`getPushToken: failed`, {safeMessage: error}) + } } }