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

Fix StripeError http_body #1435

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

jar-stripe
Copy link
Contributor

Why?

See #1432. There was a bug introduced in v7.1 of the SDK where the unprocessed http body passed into a Stripe error was not correctly set into the http_body property.

What?

  • changed StripeError constructor to properly set http_body when a string http body is passed in.

Changelog

  • Fixes an issue where http_body may be null in a Stripe error even when json_body is a valid dictionary.

@jar-stripe jar-stripe enabled auto-merge (squash) December 16, 2024 19:48
stripe/_error.py Outdated Show resolved Hide resolved
Copy link
Member

@xavdid-stripe xavdid-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! have an extra line you should pull before merge, but approved otherwise

removed extraneous pass
@jar-stripe jar-stripe merged commit 43d0937 into master Dec 16, 2024
15 checks passed
@jar-stripe jar-stripe deleted the jar/http-body-in-invalid-request-error branch December 16, 2024 20:19
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.

2 participants