Significant-Gravitas/AutoGPT · error · HTTPException
Unable to update your subscription right now. Please try aga
Error message
Unable to update your subscription right now. Please try again or contact support.
What it means
HTTP 502 raised as the terminal handler for any stripe.InvalidRequestError from modify_stripe_subscription_for_tier that matches none of the recognized shapes (no-payment-method, currency mismatch). The exception is logged via logger.exception ('Stripe error modifying subscription') and the client gets a generic retry-or-support message.
Source
Thrown at autogpt_platform/backend/backend/api/features/v1.py:1276
# "phases" or absent on older error shapes — substring fallback keeps
# the 422 firing instead of dropping to the generic 502.
if e.param == "currency" or "currency" in msg_lower:
logger.warning(
"Currency mismatch on tier change for user %s: %s", user_id, e
)
raise HTTPException(
status_code=422,
detail=(
"Tier change unavailable for your current billing currency."
" Please contact support — the target tier needs to be"
" configured for your currency in Stripe before this"
" change can go through."
),
)
logger.exception(
"Stripe error modifying subscription for user %s: %s", user_id, e
)
raise HTTPException(
status_code=502,
detail=(
"Unable to update your subscription right now. "
"Please try again or contact support."
),
)
except stripe.StripeError as e:
logger.exception(
"Stripe error modifying subscription for user %s: %s", user_id, e
)
raise HTTPException(
status_code=502,
detail=(
"Unable to update your subscription right now. "
"Please try again or contact support."
),
)
View on GitHub (pinned to 9c8bb5550f)
Solutions
- Check the backend log for the 'Stripe error modifying subscription' traceback - it contains the real Stripe message
- Retry once in case it is transient
- Report to support with the user ID; the underlying Stripe error is only visible server-side
Defensive patterns
Strategy: retry
Try / catch
try { await api.setSubscription(req); }
catch (e) { if (e.status === 502) { await backoff(); retryOnce(); } else throw e; } Prevention
- One bounded retry for 502s, then stop and surface support
- Log the correlation/user ID for support to find the server-side traceback
When it happens
Trigger: A subscription modify that fails with an unclassified Stripe InvalidRequestError - e.g. an unsupported proration parameter, a customer/tax-id constraint, or a shape not covered by the param/substring matchers above.
Common situations: New Stripe API error shapes after an API version bump; unusual account configurations (tax settings, blocked charges); malformed internal state passed to Stripe.
Related errors
- Unable to cancel the pending subscription change right now.
- Unable to cancel your subscription right now. Please try aga
- Unable to start checkout right now. Please try again or cont
- str(e)
- Your card was declined. The plan was not changed; please upd
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/7e015ad320f1072b.
Report an issue: GitHub.