Skip to content

fix(stripe): add ConnectedAccountHandler to resolve missing handler error#273

Open
Shubhank-Jonnada wants to merge 6 commits intomasterfrom
fix/stripe-connected-account-handler
Open

fix(stripe): add ConnectedAccountHandler to resolve missing handler error#273
Shubhank-Jonnada wants to merge 6 commits intomasterfrom
fix/stripe-connected-account-handler

Conversation

@Shubhank-Jonnada
Copy link
Copy Markdown
Contributor

Summary

The Stripe integration had connected_account enabled on the platform side but no ConnectedAccountHandler registered in the integration code. This caused a ValidationError: No connected account handler registered crash 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 ValidationError and returns HTTP 0 to the platform, surfacing as a crash in Raygun.

Changes

  • stripe/stripe.py — added StripeConnectedAccountHandler using the GET /v1/account endpoint to fetch the business name, email, and account ID; falls back gracefully to "Stripe Account" if the request fails

Behaviour

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

🔍 Integration Validation Results

Commit: 699880f1df3562ff01af50b043d09972edc3bb27 · style(stripe): fix ruff formatting with correct line-length 120 config
Updated: 2026-04-27T22:32:44Z

Changed directories: stripe

Check Result
Structure ⚠️ Passed with warnings
Code ⚠️ Passed with warnings
Tests ⚠️ Passed with warnings
README ✅ Passed
Version ✅ Passed
⚠️ Structure Check output
Validating 1 integration(s)...

============================================================
Integration: stripe
============================================================

Warnings (1):
  ⚠️ SDK version 1.0.2 is deprecated — upgrade to autohive-integrations-sdk==1.1.1 or later

============================================================
SUMMARY
============================================================
Integrations validated: 1
Total errors: 0
Total warnings: 1

⚠️ Validation passed with warnings - please review
⚠️ Code Check output

[notice] A new release of pip is available: 26.0.1 -> 26.1
[notice] To update, run: pip install --upgrade pip
----------------------------------------
Checking: stripe
----------------------------------------

📦 Installing dependencies...

🐍 Checking Python syntax...
   ✅ Syntax OK

📥 Checking imports...
   ✅ Imports OK

📄 Checking JSON files...
   ✅ JSON files OK

🔍 Linting with ruff...
   ✅ Lint OK

🎨 Checking formatting with ruff...
   ✅ Formatting OK

🔒 Scanning for security issues with bandit...
   ✅ Security OK

🛡️ Checking dependencies for vulnerabilities with pip-audit...
   ✅ Dependencies OK

🔗 Checking config-code sync...
   ⚠️  Action 'list_customers': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_customers': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_customers': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_customers': parameter 'created_gte' is optional in schema but accessed with inputs["created_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_customers': parameter 'created_lte' is optional in schema but accessed with inputs["created_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_customers': parameter 'email' is optional in schema but accessed with inputs["email"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'name' is optional in schema but accessed with inputs["name"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'email' is optional in schema but accessed with inputs["email"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'address' is optional in schema but accessed with inputs["address"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'phone' is optional in schema but accessed with inputs["phone"] (will raise KeyError if not provided)
   ⚠️  Action 'create_customer': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'name' is optional in schema but accessed with inputs["name"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'email' is optional in schema but accessed with inputs["email"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'address' is optional in schema but accessed with inputs["address"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'phone' is optional in schema but accessed with inputs["phone"] (will raise KeyError if not provided)
   ⚠️  Action 'update_customer': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoices': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoices': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoices': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoices': parameter 'customer' is optional in schema but accessed with inputs["customer"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoices': parameter 'status' is optional in schema but accessed with inputs["status"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoices': parameter 'created_gte' is optional in schema but accessed with inputs["created_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoices': parameter 'created_lte' is optional in schema but accessed with inputs["created_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'days_until_due' is optional in schema but accessed with inputs["days_until_due"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'auto_advance' is optional in schema but accessed with inputs["auto_advance"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'currency' is optional in schema but accessed with inputs["currency"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'collection_method' is optional in schema but accessed with inputs["collection_method"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice': parameter 'days_until_due' is optional in schema but accessed with inputs["days_until_due"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice': parameter 'auto_advance' is optional in schema but accessed with inputs["auto_advance"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice': parameter 'collection_method' is optional in schema but accessed with inputs["collection_method"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'finalize_invoice': parameter 'auto_advance' is optional in schema but accessed with inputs["auto_advance"] (will raise KeyError if not provided)
   ⚠️  Action 'pay_invoice': parameter 'payment_method' is optional in schema but accessed with inputs["payment_method"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoice_items': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoice_items': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoice_items': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_invoice_items': parameter 'customer' is optional in schema but accessed with inputs["customer"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoice_items': parameter 'pending' is optional in schema but accessed with inputs["pending"] (will raise KeyError if not provided)
   ⚠️  Action 'list_invoice_items': parameter 'invoice' is optional in schema but accessed with inputs["invoice"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'currency' is optional in schema but accessed with inputs["currency"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'invoice' is optional in schema but accessed with inputs["invoice"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'quantity' is optional in schema but accessed with inputs["quantity"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'amount' is optional in schema but accessed with inputs["amount"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'unit_amount' is optional in schema but accessed with inputs["unit_amount"] (will raise KeyError if not provided)
   ⚠️  Action 'create_invoice_item': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice_item': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice_item': parameter 'quantity' is optional in schema but accessed with inputs["quantity"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice_item': parameter 'amount' is optional in schema but accessed with inputs["amount"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice_item': parameter 'unit_amount' is optional in schema but accessed with inputs["unit_amount"] (will raise KeyError if not provided)
   ⚠️  Action 'update_invoice_item': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'list_products': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_products': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_products': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_products': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'list_products': parameter 'created_gte' is optional in schema but accessed with inputs["created_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_products': parameter 'created_lte' is optional in schema but accessed with inputs["created_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_products': parameter 'type' is optional in schema but accessed with inputs["type"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'tax_code' is optional in schema but accessed with inputs["tax_code"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'url' is optional in schema but accessed with inputs["url"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'default_price_data' is optional in schema but accessed with inputs["default_price_data"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'images' is optional in schema but accessed with inputs["images"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'create_product': parameter 'unit_label' is optional in schema but accessed with inputs["unit_label"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'default_price' is optional in schema but accessed with inputs["default_price"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'name' is optional in schema but accessed with inputs["name"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'tax_code' is optional in schema but accessed with inputs["tax_code"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'url' is optional in schema but accessed with inputs["url"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'description' is optional in schema but accessed with inputs["description"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'images' is optional in schema but accessed with inputs["images"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'update_product': parameter 'unit_label' is optional in schema but accessed with inputs["unit_label"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_prices': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_prices': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_prices': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'created_lte' is optional in schema but accessed with inputs["created_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'currency' is optional in schema but accessed with inputs["currency"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'created_gte' is optional in schema but accessed with inputs["created_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'type' is optional in schema but accessed with inputs["type"] (will raise KeyError if not provided)
   ⚠️  Action 'list_prices': parameter 'product' is optional in schema but accessed with inputs["product"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'currency' is required in schema but accessed with inputs.get() (safe for missing)
   ⚠️  Action 'create_price': parameter 'tiers_mode' is optional in schema but accessed with inputs["tiers_mode"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'tax_behavior' is optional in schema but accessed with inputs["tax_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'unit_amount_decimal' is optional in schema but accessed with inputs["unit_amount_decimal"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'recurring' is optional in schema but accessed with inputs["recurring"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'tiers' is optional in schema but accessed with inputs["tiers"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'billing_scheme' is optional in schema but accessed with inputs["billing_scheme"] (will raise KeyError if not provided)
   ⚠️  Action 'create_price': parameter 'nickname' is optional in schema but accessed with inputs["nickname"] (will raise KeyError if not provided)
   ⚠️  Action 'update_price': parameter 'active' is optional in schema but accessed with inputs["active"] (will raise KeyError if not provided)
   ⚠️  Action 'update_price': parameter 'nickname' is optional in schema but accessed with inputs["nickname"] (will raise KeyError if not provided)
   ⚠️  Action 'update_price': parameter 'tax_behavior' is optional in schema but accessed with inputs["tax_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'update_price': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_subscriptions': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_subscriptions': parameter 'limit' defined in input_schema but never accessed in code
   ⚠️  Action 'list_subscriptions': parameter 'customer' is optional in schema but accessed with inputs["customer"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'current_period_start_gte' is optional in schema but accessed with inputs["current_period_start_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'created_lte' is optional in schema but accessed with inputs["created_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'current_period_start_lte' is optional in schema but accessed with inputs["current_period_start_lte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'status' is optional in schema but accessed with inputs["status"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'created_gte' is optional in schema but accessed with inputs["created_gte"] (will raise KeyError if not provided)
   ⚠️  Action 'list_subscriptions': parameter 'price' is optional in schema but accessed with inputs["price"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'days_until_due' is optional in schema but accessed with inputs["days_until_due"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'billing_cycle_anchor' is optional in schema but accessed with inputs["billing_cycle_anchor"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'cancel_at' is optional in schema but accessed with inputs["cancel_at"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'trial_end' is optional in schema but accessed with inputs["trial_end"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'proration_behavior' is optional in schema but accessed with inputs["proration_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'payment_behavior' is optional in schema but accessed with inputs["payment_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'cancel_at_period_end' is optional in schema but accessed with inputs["cancel_at_period_end"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'collection_method' is optional in schema but accessed with inputs["collection_method"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'trial_period_days' is optional in schema but accessed with inputs["trial_period_days"] (will raise KeyError if not provided)
   ⚠️  Action 'create_subscription': parameter 'default_payment_method' is optional in schema but accessed with inputs["default_payment_method"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'days_until_due' is optional in schema but accessed with inputs["days_until_due"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'cancel_at' is optional in schema but accessed with inputs["cancel_at"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'trial_end' is optional in schema but accessed with inputs["trial_end"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'proration_behavior' is optional in schema but accessed with inputs["proration_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'cancel_at_period_end' is optional in schema but accessed with inputs["cancel_at_period_end"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'payment_behavior' is optional in schema but accessed with inputs["payment_behavior"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'collection_method' is optional in schema but accessed with inputs["collection_method"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'metadata' is optional in schema but accessed with inputs["metadata"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'items' is optional in schema but accessed with inputs["items"] (will raise KeyError if not provided)
   ⚠️  Action 'update_subscription': parameter 'default_payment_method' is optional in schema but accessed with inputs["default_payment_method"] (will raise KeyError if not provided)
   ⚠️  Action 'cancel_subscription': parameter 'prorate' is optional in schema but accessed with inputs["prorate"] (will raise KeyError if not provided)
   ⚠️  Action 'cancel_subscription': parameter 'invoice_now' is optional in schema but accessed with inputs["invoice_now"] (will raise KeyError if not provided)
   ⚠️  Action 'cancel_subscription': parameter 'cancellation_details' is optional in schema but accessed with inputs["cancellation_details"] (will raise KeyError if not provided)
   ⚠️  Action 'list_payment_methods': parameter 'starting_after' defined in input_schema but never accessed in code
   ⚠️  Action 'list_payment_methods': parameter 'ending_before' defined in input_schema but never accessed in code
   ⚠️  Action 'list_payment_methods': parameter 'limit' defined in input_schema but never accessed in code
   ✅ Config-code sync OK

🔄 Checking fetch patterns...
   ✅ Fetch patterns OK

========================================
✅ CODE CHECK PASSED
========================================
⚠️ Tests output
⚠️  No unit tests (test_*_unit.py) found in: stripe
⚠️  No unit tests to run
✅ README Check output
========================================
✅ README CHECK PASSED
========================================
✅ Version Check output
✅ stripe: 2.0.0 → 2.1.0 (minor bump)

========================================
✅ VERSION CHECK PASSED
========================================

@TheRealAgentK
Copy link
Copy Markdown
Collaborator

Would it hurt or be a huge issue to add useful tests to this PR, @Shubhank-Jonnada ?

Comment thread stripe/stripe.py
method="GET",
headers=get_common_headers(),
)
data = response.data or {}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this actually correct for SDK 1.0.2 - that this integration is still on?

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