1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 22:53:44 +00:00

claude: try/catch

This commit is contained in:
neuronull
2025-10-29 15:14:24 -06:00
parent bb8adb439e
commit cc855c375c

View File

@@ -25,6 +25,7 @@ import {
} from "@bitwarden/common/platform/state";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { LogService } from "@bitwarden/logging";
import { UserId } from "@bitwarden/user-core";
import { AutotypeConfig } from "../models/autotype-configure";
@@ -73,6 +74,7 @@ export class DesktopAutotypeService {
private platformUtilsService: PlatformUtilsService,
private billingAccountProfileStateService: BillingAccountProfileStateService,
private desktopAutotypePolicy: DesktopAutotypeDefaultSettingPolicy,
private logService: LogService,
) {
this.autotypeEnabledUserSetting$ = this.autotypeEnabledState.state$.pipe(
map((enabled) => enabled ?? false),
@@ -114,8 +116,12 @@ export class DesktopAutotypeService {
])
.pipe(
map(async ([autotypeEnabledState, autotypeDefaultPolicy]) => {
if (autotypeDefaultPolicy === true && autotypeEnabledState === null) {
await this.setAutotypeEnabledState(true);
try {
if (autotypeDefaultPolicy === true && autotypeEnabledState === null) {
await this.setAutotypeEnabledState(true);
}
} catch {
this.logService.error("Failed to set Autotype enabled state.");
}
}),
takeUntilDestroyed(),