fix(dashboard): stop retrying failed HTTP requests in React Query - #2150
Merged
Merged
Conversation
React Query retried every failed query 3 times by default, so a single page view of a card whose route was failing produced four failures at the gateway and was enough on its own to open the DAO circuit breaker. HTTP errors are deterministic and are no longer retried; network errors are retried once. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
brunod-e
requested review from
LeonardoVieira1630,
PedroBinotto,
alextnetto,
isadorable-png and
pikonha
as code owners
September 3, 2026 12:22
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
🚅 Deployed to the anticapture-pr-2150 environment in anticapture-infra
|
railway-app
Bot
temporarily deployed
to
anticapture-infra / anticapture-pr-2150
September 3, 2026 12:24
Destroyed
Contributor
|
🔍 Vercel preview: https://anticapture-q93hrud3e-ful.vercel.app |
pikonha
approved these changes
Sep 9, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contexto
Nas quedas de 26-28/08 o breaker do gateful abriu por DAO após 5 falhas consecutivas. O dashboard usa
new QueryClient()sem configuração, e o padrão do React Query é 3 retries com backoff. Uma única visita à página de Revenue do ENS (cuja rotarenewal-tenurerespondia 503) gerava 4 falhas em segundos, praticamente suficiente para derrubar o ENS inteiro sozinha.Mudança
shouldRetryQuery: não re-tenta erros HTTP (o SDK rejeita comstatus); re-tenta erros de rede uma vez.defaultOptions.queries.retrynoQueryClientglobal.Relacionado: #2148 (breaker por rota e janela) e #2149 (rotas de terceiros deixam de responder 5xx).
Verificação
jest shared/utils/query-retry.test.ts: 3 testes passandoeslintnos arquivos alterados: OKtsc --noEmit: sem erros nos arquivos alterados (o worktree não tem@anticapture/clientbuildado, então o typecheck completo reporta apenas erros pré-existentes desse pacote)🤖 Generated with Claude Code