mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
change Error check to ErrorResponse (#13789)
This commit is contained in:
@@ -3,6 +3,7 @@ import { FormControl, FormGroup, Validators } from "@angular/forms";
|
|||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
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 { 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 { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
@@ -75,7 +76,7 @@ export class MigrateFromLegacyEncryptionComponent {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
// If the error is due to missing folders, we can delete all folders and try again
|
// If the error is due to missing folders, we can delete all folders and try again
|
||||||
if (
|
if (
|
||||||
e instanceof Error &&
|
e instanceof ErrorResponse &&
|
||||||
e.message === "All existing folders must be included in the rotation."
|
e.message === "All existing folders must be included in the rotation."
|
||||||
) {
|
) {
|
||||||
const deleteFolders = await this.dialogService.openSimpleDialog({
|
const deleteFolders = await this.dialogService.openSimpleDialog({
|
||||||
|
|||||||
Reference in New Issue
Block a user