Surface Retry-After header in error envelope for rate-limited responses
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
No source file or test is named. Start by locating the gws HTTP error-envelope handling and existing tests for forwarded API errors; then determine where Retry-After is available and how error fields are serialized. Done means 429, rate-limit 403, 500, and 503 responses preserve the header as seconds-from-now, while responses without it remain unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature request
When a Calendar API call returns a rate-limit response (HTTP 429, or 403 with reason rateLimitExceeded / userRateLimitExceeded), Google often returns a Retry-After response header indicating when the client may safely retry. Currently gws does not surface that header value to callers - the error JSON it forwards on stderr only carries Google's standard error envelope:
{"error":{"code":429,"message":"...","errors":[{"reason":"rateLimitExceeded"}]}}
Downstream tools that wrap gws for retry have no way to honor Retry-After and must fall back to a fixed exponential schedule.
Suggested shape
Add retry_after_seconds (or retryAfter - whatever fits gws conventions) to the error envelope when the response carried a Retry-After header. Empty/absent when the header was not present.
{"error":{"code":429,"message":"...","errors":[{"reason":"rateLimitExceeded"}],"retryAfterSeconds":17}}
Or, alternatively, a top-level sibling field outside error:
{"error":{...},"retryAfterSeconds":17}
The header can be either an integer number of seconds OR an HTTP-date; gws should normalize to seconds-from-now to keep downstream parsing simple.
This would also be useful for 500/503 responses, where Google sometimes returns Retry-After to throttle clients during incidents.
Notes
- Header name in Google's responses is
Retry-After. RFC 7231 §7.1.3. - Calendar API documents the header in their usage limits and rate-limiting docs.
- No security or backwards-compat concern - this is purely additive to the error envelope.
- Lenguaje dominante
- Rust
- Estrellas
- 32.3k
- Forks
- 2k
- Merge medio
- 16 h 3 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de googleworkspace/cli
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
googleworkspace/cli#984 ·
Los mantenedores suelen responder en 1 día
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
googleworkspace/cli#983 ·
Los mantenedores suelen responder en 1 día
-
Replace gemini with agyAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
googleworkspace/cli#958 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
googleworkspace/cli#921 ·
Los mantenedores suelen responder en 1 día
-
Add cli to awesome-ai-plugins?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
googleworkspace/cli#920 ·
Los mantenedores suelen responder en 1 día
Todos los issues de googleworkspace/cli
Issues similares
-
area:cli area:security bug priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
rtk-ai/rtk#5127 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
status: new topic: ga4gh-sdk type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
comp-rbac
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ClickHouse/ClickHouse#131875 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPosiblemente ocupada @Borg93 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
lance-format/lance#11117 ·
Los mantenedores suelen responder en 2 días