Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch JsonSyntaxException when processing all errors #1919

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

helenye-stripe
Copy link
Contributor

Why?

Fixes #1868.

What?

We changed error handling to understand apiMode from the shape of the error response, but did not wrap all of our Gson calls in a try-catch. This fixes that and also adds a test.

@helenye-stripe helenye-stripe requested review from a team and jar-stripe and removed request for a team November 6, 2024 19:14
Copy link
Contributor

@jar-stripe jar-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good w/ a couple of non-blocking comments (well, that sentence fragment would be good to fix before we merge :) )

@helenye-stripe helenye-stripe merged commit 0f94acf into master Nov 6, 2024
12 checks passed
@helenye-stripe helenye-stripe deleted the helenye-fix-gson-error branch November 6, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stripeClient throw JsonSyntaxException instead of StripeException
2 participants