handle 500 errors on tip better

This commit is contained in:
Anthony 2021-07-27 18:06:09 +02:00
parent e4d7e4f69d
commit c3bc342eef
No known key found for this signature in database
GPG key ID: C386D3C93D50E356

View file

@ -297,7 +297,8 @@ function WalletSendTip(props: Props) {
.catch(function(error) { .catch(function(error) {
var displayError = 'Sorry, there was an error in processing your payment!'; var displayError = 'Sorry, there was an error in processing your payment!';
if (error.message !== 'payment intent failed to confirm') { // if it's not an error we're expecting then show it to frontend
if (error.message && error.message !== 'payment intent failed to confirm') {
displayError = error.message; displayError = error.message;
} }