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:
@@ -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"),
|
||||
});
|
||||
|
||||
@@ -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"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user