1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-09 19:28:06 +01:00

[PM-2014] feat: improve error on delete

This commit is contained in:
Andreas Coroiu 2023-05-11 13:55:10 +02:00
parent f8f7615f6c
commit 2845f1f288
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A

View File

@ -121,8 +121,16 @@ export class WebauthnService {
this.refresh(); this.refresh();
return true; return true;
} catch (error) { } catch (error) {
if (error instanceof ErrorResponse && error.statusCode === 400) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("error"),
this.i18nService.t("invalidMasterPassword")
);
} else {
this.logService?.error(error); this.logService?.error(error);
this.platformUtilsService.showToast("error", null, this.i18nService.t("unexpectedError")); this.platformUtilsService.showToast("error", null, this.i18nService.t("unexpectedError"));
}
return false; return false;
} }
} }