#Little_seven
1 messages ยท Page 1 of 1 (latest)
Hello there
Can you tell me a little bit about why you are worried about catching an invalid key error?
I have this platform in which members can setup their own stripe payments using apikeys.
but sometimes due to human error, they may fill-in wrong values.
so need to validate if the keys provided are correct.
as this keys are used in public checkout, and cannot clean display if code breaks when unable to capture error thrown
thank you
So in the above you don't see the exception error from catching ApiErrorException
yes
thank you
@molten terrace can you try \Stripe\Exception\AuthenticationException?
Hi ๐
I'm stepping in for my colleague who had to go. Can you try using the exact code shown here? https://pastebin.com/aZzYK47j
hello, checking
got it,
\Stripe\Exception\AuthenticationException did catch the error given that
where "new \Stripe\StripeClient" is outside try{}catch{} code
Okay so wait... does that resolve your issue?
yup! thank you.