diff --git a/src/common/login/CredentialRemovalHandler.ts b/src/common/login/CredentialRemovalHandler.ts index 2472b8bbc3c2..0b8951cd7c1a 100644 --- a/src/common/login/CredentialRemovalHandler.ts +++ b/src/common/login/CredentialRemovalHandler.ts @@ -1,6 +1,7 @@ import { NativePushServiceApp } from "../native/main/NativePushServiceApp.js" import { ConfigurationDatabase } from "../api/worker/facades/lazy/ConfigurationDatabase.js" import { CredentialsInfo } from "../native/common/generatedipc/CredentialsInfo.js" +import { DeviceStorageUnavailableError } from "../api/common/error/DeviceStorageUnavailableError" export interface CredentialRemovalHandler { onCredentialsRemoved(credentialInfo: CredentialsInfo): Promise @@ -19,7 +20,15 @@ export class AppsCredentialRemovalHandler implements CredentialRemovalHandler { async onCredentialsRemoved({ login, userId }: CredentialsInfo) { await this.pushApp.invalidateAlarmsForUser(userId) - await this.pushApp.removeUserFromNotifications(userId) + try { + await this.pushApp.removeUserFromNotifications(userId) + } catch (e) { + if (e instanceof DeviceStorageUnavailableError) { + console.warn("Could not remove SSE data: ", e) + } else { + throw e + } + } await this.configFacade.delete(userId) await this.appSpecificCredentialRemovalActions(login, userId)