Stripe: Catch failing promise on JS level

This commit is contained in:
Raphael Michel
2023-01-18 11:47:28 +01:00
parent ff2fa43ba1
commit 0ecbee48ae

View File

@@ -28,6 +28,11 @@ var pretixstripe = {
// and submit
$form.get(0).submit();
}
}).catch((e) => {
waitingDialog.hide();
$(".stripe-errors").stop().hide().removeClass("sr-only");
$(".stripe-errors").html("<div class='alert alert-danger'>Technical error, please contact support: " + e + "</div>");
$(".stripe-errors").slideDown();
});
},
'load': function () {