1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-30 22:41:33 +01:00

Fix the unclear error message on add payment (#13005)

This commit is contained in:
cyprain-okeke 2025-01-23 11:17:33 +01:00 committed by GitHub
parent abb18881b6
commit e847f964c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,6 +99,7 @@ export class AdjustPaymentDialogV2Component implements OnInit {
submit = async (): Promise<void> => {
if (!this.taxInfoComponent.validate()) {
this.taxInfoComponent.markAllAsTouched();
return;
}
@ -117,10 +118,11 @@ export class AdjustPaymentDialogV2Component implements OnInit {
this.dialogRef.close(AdjustPaymentDialogV2ResultType.Submitted);
} catch (error) {
const msg = typeof error == "object" ? error.message : error;
this.toastService.showToast({
variant: "error",
title: null,
message: this.i18nService.t(error.message) || error.message,
message: this.i18nService.t(msg) || msg,
});
}
};