mirror of
https://github.com/bitwarden/browser
synced 2025-01-23 09:42:06 +01:00
[PM-2647] Remove try/catch that was silencing error messages on incorrect passwords (#5662)
This commit is contained in:
parent
da436317e3
commit
48a9b7d703
@ -9,7 +9,6 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||
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 { Verification } from "@bitwarden/common/types/verification";
|
||||
@ -36,10 +35,13 @@ class CountBasedLocalizationKey {
|
||||
|
||||
class OrganizationContentSummaryItem {
|
||||
count: number;
|
||||
|
||||
get localizationKey(): string {
|
||||
return this.localizationKeyOptions.getKey(this.count);
|
||||
}
|
||||
|
||||
private localizationKeyOptions: CountBasedLocalizationKey;
|
||||
|
||||
constructor(count: number, localizationKeyOptions: CountBasedLocalizationKey) {
|
||||
this.count = count;
|
||||
this.localizationKeyOptions = localizationKeyOptions;
|
||||
@ -88,7 +90,6 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
|
||||
private i18nService: I18nService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private userVerificationService: UserVerificationService,
|
||||
private logService: LogService,
|
||||
private cipherService: CipherService,
|
||||
private organizationService: OrganizationService,
|
||||
private organizationApiService: OrganizationApiServiceAbstraction,
|
||||
@ -116,20 +117,16 @@ export class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
protected submit = async () => {
|
||||
try {
|
||||
this.formPromise = this.userVerificationService
|
||||
.buildRequest(this.formGroup.value.secret)
|
||||
.then((request) => this.organizationApiService.delete(this.organization.id, request));
|
||||
await this.formPromise;
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
this.i18nService.t("organizationDeleted"),
|
||||
this.i18nService.t("organizationDeletedDesc")
|
||||
);
|
||||
this.dialogRef.close(DeleteOrganizationDialogResult.Deleted);
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
await this.userVerificationService
|
||||
.buildRequest(this.formGroup.value.secret)
|
||||
.then((request) => this.organizationApiService.delete(this.organization.id, request));
|
||||
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
this.i18nService.t("organizationDeleted"),
|
||||
this.i18nService.t("organizationDeletedDesc")
|
||||
);
|
||||
this.dialogRef.close(DeleteOrganizationDialogResult.Deleted);
|
||||
};
|
||||
|
||||
private buildOrganizationContentSummary(ciphers: CipherView[]): OrganizationContentSummary {
|
||||
|
Loading…
Reference in New Issue
Block a user