mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
Fix the unclear error message on add payment (#13005)
This commit is contained in:
@@ -99,6 +99,7 @@ export class AdjustPaymentDialogV2Component implements OnInit {
|
|||||||
|
|
||||||
submit = async (): Promise<void> => {
|
submit = async (): Promise<void> => {
|
||||||
if (!this.taxInfoComponent.validate()) {
|
if (!this.taxInfoComponent.validate()) {
|
||||||
|
this.taxInfoComponent.markAllAsTouched();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,10 +118,11 @@ export class AdjustPaymentDialogV2Component implements OnInit {
|
|||||||
|
|
||||||
this.dialogRef.close(AdjustPaymentDialogV2ResultType.Submitted);
|
this.dialogRef.close(AdjustPaymentDialogV2ResultType.Submitted);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
const msg = typeof error == "object" ? error.message : error;
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
title: null,
|
title: null,
|
||||||
message: this.i18nService.t(error.message) || error.message,
|
message: this.i18nService.t(msg) || msg,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user