From 6eb4178a4e474d0c00fb01d121b55030d44a0cf1 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi <kurundjalmi@thirdsectordesign.org> Date: Wed, 14 Dec 2022 13:47:57 +0000 Subject: [PATCH] return correct error code for invalid request exception --- CRM/Core/Payment/Stripe.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php index 12d724df..271fd66b 100644 --- a/CRM/Core/Payment/Stripe.php +++ b/CRM/Core/Payment/Stripe.php @@ -287,6 +287,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment { // Too many requests made to the API too quickly case 'Stripe\Exception\InvalidRequestException': // Invalid parameters were supplied to Stripe's API + $genericError['code'] = $e->getError()->code; case 'Stripe\Exception\AuthenticationException': // Authentication with Stripe's API failed // (maybe you changed API keys recently) -- GitLab