You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd13e7f
Browse filesBrowse the repository at this point in the historyBrowse files
Retry transient server errors in theme API requests
Theme commands (`theme pull`, `theme dev`, ...) crashed on the first
Admin API response carrying `extensions.code: INTERNAL_SERVER_ERROR`
(returned on an HTTP 200), even though these are usually brief backend
failures, such as a database briefly running out of connections, that
succeed when retried. Because theme requests use `handleErrors: false`,
the raw `ClientError` was reported as an unexpected error, with the
whole GraphQL response as its message.
- Add an opt-in `retryTransientServerErrors` request behaviour. When set,
`INTERNAL_SERVER_ERROR` and HTTP 502/503/504 responses are retried up
to 3 times with exponential backoff (1s, 2s, 4s). This is a separate,
smaller budget than rate-limit retries, so an overloaded backend
isn't hit with many quick retries.
- GraphQL requests only honour the behaviour for documents that contain
only queries. Mutations are never retried on these errors.
- Enable it for theme API requests.
- If a theme request still fails, throw a friendly AbortError that keeps
the request ID instead of the raw response. `fetchTheme` no longer
treats a temporary failure as "theme not found".
Co-authored-by: Elizabeth Kenyon <elizabeth.kenyon@shopify.com>
Theme commands now retry Admin API requests that fail with a temporary server error (`INTERNAL_SERVER_ERROR`, 502, 503 or 504), up to 3 times with backoff. If the error persists, they show a friendly "try again" message with the request ID instead of the raw API response. Mutations are never retried.
0 commit comments