Updates to error handling
This commit is contained in:
parent
f5c78590db
commit
15949ed8bc
|
@ -5,7 +5,7 @@
|
|||
<i class="bwi bwi-exclamation-triangle text-warning"></i>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title tw-text-center" id="confirmUserTitle">
|
||||
<h2 class="tw-text-center tw-font-semibold" id="confirmUserTitle">
|
||||
{{ modalTitle | i18n }}
|
||||
</h2>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<i class="bwi bwi-exclamation-triangle text-warning"></i>
|
||||
</div>
|
||||
|
||||
<h2 class="modal-title tw-text-center" id="confirmUserTitle">
|
||||
<h2 class="tw-text-center tw-font-semibold" id="confirmUserTitle">
|
||||
{{ "confirmVaultImport" | i18n }}
|
||||
</h2>
|
||||
|
||||
|
|
|
@ -114,12 +114,16 @@ export class ImportComponent implements OnInit {
|
|||
if (error != null) {
|
||||
//Check if the error is that a password is required
|
||||
if (error.passwordRequired) {
|
||||
if (await this.promptPassword(fileContents)) {
|
||||
if (await this.promptFilePassword(fileContents)) {
|
||||
//successful
|
||||
} else {
|
||||
//failed
|
||||
this.error(error); //TODO different error
|
||||
//failed - File Password issues
|
||||
this.loading = false;
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("error"),
|
||||
this.i18nService.t("invalidMasterPassword")
|
||||
);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
@ -139,7 +143,7 @@ export class ImportComponent implements OnInit {
|
|||
this.loading = false;
|
||||
}
|
||||
|
||||
private async promptPassword(fcontents: string) {
|
||||
private async promptFilePassword(fcontents: string) {
|
||||
return await this.filePasswordPromptService.showPasswordPrompt(fcontents, this.organizationId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue