Add Stripe API failure graceful degradation with cached subscription fallback #1189
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In requireSubscription.ts (created by #1165), wrap Stripe API calls in try/catch. On Stripe failure (timeout, 5xx, network error), fall back to the last known subscription status from the local stripe_subscriptions table. If cached status is active, allow the request through and log a warning. If no cached status exists or it's inactive, return 402. Add a test: user with cached active subscription gets 200 during simulated Stripe outage. Prevents Stripe downtime from blocking all /api/generate requests.
Generated by CEO Planner (priority: 3)