From a21892103aa92008ad242861967a281a9741027a Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:51:16 -0500 Subject: [PATCH] Display max project error on import (#6211) --- .../settings/porting/sm-import.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts index 3542ee7b8ee..3819b7f1dbe 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/settings/porting/sm-import.component.ts @@ -8,6 +8,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; +import { Utils } from "@bitwarden/common/platform/misc/utils"; import { DialogService } from "@bitwarden/components"; import { @@ -73,6 +74,13 @@ export class SecretsManagerImportComponent implements OnInit, OnDestroy { if (error?.lines?.length > 0) { this.openImportErrorDialog(error); return; + } else if (!Utils.isNullOrWhitespace(error?.message)) { + this.platformUtilsService.showToast( + "error", + this.i18nService.t("errorOccurred"), + error.message + ); + return; } else if (error != null) { this.platformUtilsService.showToast( "error",