1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

Display max project error on import (#6211)

This commit is contained in:
Thomas Avery 2023-09-07 17:51:16 -05:00 committed by GitHub
parent 5440e372f6
commit a21892103a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ import { FileDownloadService } from "@bitwarden/common/platform/abstractions/fil
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.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 { DialogService } from "@bitwarden/components";
import { import {
@ -73,6 +74,13 @@ export class SecretsManagerImportComponent implements OnInit, OnDestroy {
if (error?.lines?.length > 0) { if (error?.lines?.length > 0) {
this.openImportErrorDialog(error); this.openImportErrorDialog(error);
return; return;
} else if (!Utils.isNullOrWhitespace(error?.message)) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
error.message
);
return;
} else if (error != null) { } else if (error != null) {
this.platformUtilsService.showToast( this.platformUtilsService.showToast(
"error", "error",