Skip to content

fix(dashboard): stop retrying failed HTTP requests in React Query - #2150

Merged
brunod-e merged 1 commit into
devfrom
brunod-e/dashboard-query-retry
Sep 15, 2026
Merged

brunod-e merged 1 commit into
devfrom
brunod-e/dashboard-query-retry

Conversation

@brunod-e

@brunod-e brunod-e commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

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 rota renewal-tenure respondia 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 com status); re-tenta erros de rede uma vez.
  • Aplicado como defaultOptions.queries.retry no QueryClient global.

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 passando
  • eslint nos arquivos alterados: OK
  • tsc --noEmit: sem erros nos arquivos alterados (o worktree não tem @anticapture/client buildado, então o typecheck completo reporta apenas erros pré-existentes desse pacote)

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
anticapture-storybook Ready Ready Preview Sep 3, 2026 12:24pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
anticapture Ignored Ignored Sep 3, 2026 12:24pm UTC

Request Review

@railway-app

railway-app Bot commented Sep 3, 2026

Copy link
Copy Markdown

🚅 Deployed to the anticapture-pr-2150 environment in anticapture-infra

Service Status Web Updated
uniswap-indexer-offchain ✅ Success (View Logs) Sep 3, 2026 at 6:17 pm UTC
compound-indexer-offchain ✅ Success (View Logs) Sep 3, 2026 at 6:14 pm UTC
ens-indexer-offchain ✅ Success (View Logs) Sep 3, 2026 at 6:14 pm UTC
gitcoin-indexer-offchain ✅ Success (View Logs) Sep 3, 2026 at 6:14 pm UTC
prometheus ✅ Success (View Logs) Sep 3, 2026 at 1:26 pm UTC
grafana ✅ Success (View Logs) Web Sep 3, 2026 at 1:26 pm UTC
docs ✅ Success (View Logs) Web Sep 3, 2026 at 12:27 pm UTC
mcp ✅ Success (View Logs) Web Sep 3, 2026 at 12:27 pm UTC
gateful ✅ Success (View Logs) Web Sep 3, 2026 at 12:27 pm UTC
obol-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
gitcoin-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
tornado-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
compound-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
nouns-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
gitcoin-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
aave-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
tornado-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
ens-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
address-enrichment ✅ Success (View Logs) Web Sep 3, 2026 at 12:27 pm UTC
aave-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
fluid-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
ens-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
lil-nouns-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
scroll-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
uniswap-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
compound-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
nouns-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
lil-nouns-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
shutter-api ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
shutter-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
uniswap-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
fluid-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
obol-indexer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
ens-relayer ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
erpc ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
otelcol ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
nodeful ✅ Success (View Logs) Sep 3, 2026 at 12:27 pm UTC
shutter-indexer-offchain ❌ Build Failed (View Logs) Sep 3, 2026 at 12:26 pm UTC
tempo ✅ Success (View Logs) Sep 3, 2026 at 12:26 pm UTC
scroll-api ✅ Success (View Logs) Sep 3, 2026 at 12:26 pm UTC
alertmanager ✅ Success (View Logs) Web Sep 3, 2026 at 12:26 pm UTC
user-api ✅ Success (View Logs) Web Sep 3, 2026 at 12:26 pm UTC
loki ✅ Success (View Logs) Sep 3, 2026 at 12:26 pm UTC
authful ✅ Success (View Logs) Web Sep 3, 2026 at 12:25 pm UTC

@railway-app
railway-app Bot temporarily deployed to anticapture-infra / anticapture-pr-2150 September 3, 2026 12:24 Destroyed
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Vercel preview: https://anticapture-q93hrud3e-ful.vercel.app

@brunod-e
brunod-e merged commit 0e3ee4f into dev Sep 15, 2026
68 of 70 checks passed
@brunod-e
brunod-e deleted the brunod-e/dashboard-query-retry branch September 15, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants