Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

HttpService retries rate-limited requests without honouring Retry-After

Aperta
#7,629 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start by locating HttpService and its get, getJson and download retry loops, then read how the project configures got retries. Check the tests for these methods and run them to establish current retry behavior. Done means all three methods use one retry layer, respect Retry-After with a maximum wait, and back off when the header is absent.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type:bug

Bug

HttpService retries a rate-limited request (429) right away, ignoring when the server says the next try is allowed.

get and getJson wrap got in their own three-attempt loop, and download does the same around got.stream. These loops retry right away, without any delay. When a server answers 429, or 503, with a Retry-After header, the retries land inside the blocked window, so they fail the same way and add more load to an already limited server.

got also retries internally, with its own defaults, and the two retry layers multiply. One call can send up to nine requests.

Expected

  • A 429 or 503 response with Retry-After delays the next attempt until that time, up to a sane maximum. If the wait would exceed the maximum, fail fast with the original error.
  • Without Retry-After, back off between attempts instead of retrying immediately.
  • One retry layer: either got's retry options (which honour Retry-After) or our loop, not both.
  • get, getJson and download behave the same.

Context

Found while making get/getJson fail fast on permanent 4xx errors (#7628). That change keeps retrying 408 and 429 but doesn't change their timing.


Opened by Claude Opus 5.5 in Claude Code on behalf of @viceice.

Lingua principale
TypeScript
Stelle
58
Fork
65
Merge medio
11h 54m
PR unite (30g)
428

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di containerbase/base

Tutte le issue di containerbase/base

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.