1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

change Error check to ErrorResponse (#13789)

This commit is contained in:
Jake Fink
2025-03-11 15:32:17 -04:00
committed by GitHub
parent 00e822fb13
commit cb14d17f73

View File

@@ -3,6 +3,7 @@ import { FormControl, FormGroup, Validators } from "@angular/forms";
import { firstValueFrom } from "rxjs";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { ErrorResponse } from "@bitwarden/common/models/response/error.response";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
@@ -75,7 +76,7 @@ export class MigrateFromLegacyEncryptionComponent {
} catch (e) {
// If the error is due to missing folders, we can delete all folders and try again
if (
e instanceof Error &&
e instanceof ErrorResponse &&
e.message === "All existing folders must be included in the rotation."
) {
const deleteFolders = await this.dialogService.openSimpleDialog({