#pavan-customer-exists
1 messages · Page 1 of 1 (latest)
normally retrieve is the API to use to check if a customer ID exists
you can catch the exception the API throws Exception. https://stripe.com/docs/api/errors/handling?lang=node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It is throwing com.stripe.exception.InvalidRequestException. Won't this be too generic to catch ?
Actually this is a good exception to catch especially if you are collecting input from your user, they might enter some values that results in invalidRequest error, this is the good exception to catch to allow your user to correct their input