fix(stripe): add ConnectedAccountHandler to resolve missing handler error#273
Open
Shubhank-Jonnada wants to merge 6 commits intomasterfrom
Open
fix(stripe): add ConnectedAccountHandler to resolve missing handler error#273Shubhank-Jonnada wants to merge 6 commits intomasterfrom
Shubhank-Jonnada wants to merge 6 commits intomasterfrom
Conversation
🔍 Integration Validation ResultsCommit: Changed directories:
|
Collaborator
|
Would it hurt or be a huge issue to add useful tests to this PR, @Shubhank-Jonnada ? |
| method="GET", | ||
| headers=get_common_headers(), | ||
| ) | ||
| data = response.data or {} |
Collaborator
There was a problem hiding this comment.
Is this actually correct for SDK 1.0.2 - that this integration is still on?
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Stripe integration had
connected_accountenabled on the platform side but noConnectedAccountHandlerregistered in the integration code. This caused aValidationError: No connected account handler registeredcrash every time a user connected their Stripe account.Root Cause
The platform calls the connected account endpoint after OAuth to display the linked account name/email in the UI. Without a registered handler the SDK raises a
ValidationErrorand returns HTTP 0 to the platform, surfacing as a crash in Raygun.Changes
stripe/stripe.py— addedStripeConnectedAccountHandlerusing theGET /v1/accountendpoint to fetch the business name, email, and account ID; falls back gracefully to"Stripe Account"if the request failsBehaviour
On successful connect, the UI will now show the Stripe account's business name (or email if no name is set) instead of erroring. The existing actions are unaffected.