1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-15 07:54:55 +00:00

PM-29621 show errors only when 404 is received

This commit is contained in:
voommen-livefront
2026-01-23 10:47:34 -06:00
parent d2fc52c812
commit 1dcf4c409a
2 changed files with 22 additions and 4 deletions

View File

@@ -163,9 +163,18 @@ export class PasswordChangeMetricComponent implements OnInit {
variant: "success",
title: this.i18nService.t("success"),
});
} catch {
} catch (error) {
if (error?.statusCode === 404) {
this.toastService.showToast({
message: this.i18nService.t("mustBeOrganizationOwnerAdmin"),
variant: "error",
title: this.i18nService.t("error"),
});
return;
}
this.toastService.showToast({
message: this.i18nService.t("mustBeOrganizationOwnerAdmin"),
message: this.i18nService.t("unexpectedError"),
variant: "error",
title: this.i18nService.t("error"),
});

View File

@@ -164,9 +164,18 @@ export class CriticalApplicationsComponent implements OnInit {
variant: "success",
title: this.i18nService.t("success"),
});
} catch {
} catch (error) {
if (error?.statusCode === 404) {
this.toastService.showToast({
message: this.i18nService.t("mustBeOrganizationOwnerAdmin"),
variant: "error",
title: this.i18nService.t("error"),
});
return;
}
this.toastService.showToast({
message: this.i18nService.t("mustBeOrganizationOwnerAdmin"),
message: this.i18nService.t("unexpectedError"),
variant: "error",
title: this.i18nService.t("error"),
});