1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 03:33:30 +00: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

View File

@@ -121,8 +121,16 @@ export class WebauthnService {
this.refresh();
return true;
} catch (error) {
this.logService?.error(error);
this.platformUtilsService.showToast("error", null, this.i18nService.t("unexpectedError"));
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.platformUtilsService.showToast("error", null, this.i18nService.t("unexpectedError"));
}
return false;
}
}