fix(billing): retry transient Aether read failures (fixes intermittent Free-tier)#11
Merged
Merged
Conversation
…state Aether read calls (getSubscription, getEntitlements, getPrices, listSubscriptions) used a single 5s timeout and returned null/[] on any failure. A momentarily slow Aether/Stripe response therefore surfaced as "no subscription" -> apps rendered the Free tier for a paying customer (observed on a Fractal workspace). Add resilientFetch: a per-attempt 10s timeout with retries (2) and backoff on transient failures (timeout / network / 5xx). 2xx-4xx still return immediately so 404/403 are handled as before. Writes (checkout, portal, cancel, renew) are intentionally NOT retried to avoid duplicate side effects. Fixes the intermittent Free-tier false negative across all Omni apps that use the shared billing provider.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Read calls used a single 5s timeout and returned null/[] on any failure, so a momentarily slow Aether response surfaced as 'no subscription' and apps rendered the Free tier for paying customers (seen on a Fractal workspace). Adds resilientFetch (10s/attempt, 2 retries, backoff on timeout/network/5xx); 2xx-4xx return immediately (404/403 unchanged). Writes are not retried. tsc 0, 279 tests pass, build ok.