diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx index 51d7d3ec..4e18c1f3 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx @@ -120,13 +120,23 @@ const UserWebPushSettings = () => { if (endpointToDelete) { await deletePushSubscriptionFromBackend(endpointToDelete); } else if (dataDevices && dataDevices.length > 0) { + let hasFailures = false; + for (const device of dataDevices) { try { await deletePushSubscriptionFromBackend(device.endpoint); } catch (error) { - // Continue deleting other subscriptions even if one fails + hasFailures = true; } } + + if (hasFailures) { + addToast(intl.formatMessage(messages.disablingwebpusherror), { + autoDismiss: true, + appearance: 'error', + }); + return; + } } localStorage.setItem('pushNotificationsEnabled', 'false');