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

Also log error in case of non-stripe.Error #939

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Aug 29, 2019

In a few cases it's possible for ResponseToError to return an error
that's not a *stripe.Error. This should never happen, but could occur
if say the Stripe API returned a mangled JSON blob, but somehow managed
to close the connection properly. It's an unlikely scenario, but even
so, it's better not to let it slip through the cracks.

I also moved one more logging statement out of ResponseToError so we
can log everything of this type in one place.

r? @ob-stripe (Sorry, one more tweak on the last patch.)
cc @stripe/api-libraries

In a few cases it's possible for `ResponseToError` to return an error
that's not a `*stripe.Error`. This should never happen, but could occur
if say the Stripe API returned a mangled JSON blob, but somehow managed
to close the connection properly. It's an unlikely scenario, but even
so, it's better not to let it slip through the cracks.

I also moved one more logging statement out of `ResponseToError` so we
can log everything of this type in one place.
@brandur-stripe
Copy link
Contributor

Thank you again :)

@brandur-stripe brandur-stripe merged commit f91e704 into master Aug 30, 2019
@brandur-stripe brandur-stripe deleted the brandur-else-case branch August 30, 2019 02:21
@brandur-stripe
Copy link
Contributor

Released as 62.8.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants