#Piercy

1 messages · Page 1 of 1 (latest)

undone tokenBOT
keen spear
west obsidian
#

Were deliberatately testing a failure

#

We think the functionality has changed that it now throws and exception, when previously, it would return an object that contained details about the failure.

keen spear
#

That's depends on how you are implementing/handling failure. in the request req_YVx2tEkMdegmOm you have the object that contains the details of the failure

west obsidian
#

previously we would call the node library paymentIntents.create. That would return an object, and then we look inside that object to check whether the payment intent was successful, and if it failed, for what reason.

Now, we call paymentIntents.create and an exception is thrown from the library, so there's no object to check.

#

We can obviously, make an API call, to get the payment intent again, but from our perspective it looks like something has changed, from returning an object to throwing an exception?

#

To give you some insight, from what we can tell, this has been running since February 2020, and we have suddenly seen an issue with exceptions being thrown from this.

keen spear
#

Doing a quick test....

west obsidian
#

Yeah, i think thats going to be the approach we take, but i will say this looks like new behavior.

#

Were now seeing exceptions regularly, where as previously it was objects. It could just be unfortunate timing, but since around april 19th, exceptions have risen

keen spear
#

Just refactor your code, catch exceptions and inspect them.

west obsidian
#

i will do that, but i also have to go to my boss and explain why the functionality thats been working since 2020 has now failed for a bunch of people

#

considering we hard set the API version, and have hard set the library version, we aren't expecting things to change - yet it seems the have

keen spear
#

That depends what Stripe Nodejs library you are using and what changes was made since 2020.

west obsidian
keen spear
#

This has no link to API version, SDKs are wrappers to API calls. This is how the SDK is managing API responses. Again, I have a doubt about what you are saying that before the SDK isn't throwing an exception and now it's throwing without changing any think in your integration/code.