Surface Retry-After header in error envelope for rate-limited responses
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 32.3k
- Forks
- 2k
- Merge moyen
- 16 h 3 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de googleworkspace/cli
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
googleworkspace/cli#984 ·
Les mainteneurs répondent en général sous 1 jour
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
googleworkspace/cli#983 ·
Les mainteneurs répondent en général sous 1 jour
-
Replace gemini with agyOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
googleworkspace/cli#958 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
googleworkspace/cli#921 ·
Les mainteneurs répondent en général sous 1 jour
-
Add cli to awesome-ai-plugins?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
googleworkspace/cli#920 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de googleworkspace/cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
matrix-org/matrix-rust-sdk#7495 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
yantrikos/yantrik-os#1272 ·
Les mainteneurs répondent en général sous 1 jour
-
crate: spate-kafka priority: low tech-debt
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: Executable check only looks at the "others" execute bit, so 0750 binaries are rejectedOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
macOS 菜单栏托盘图标保留橙色,与系统单色图标风格不一致Peut-être pris @xhugoliu l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
YizhengWw/HachimoDock#56 · 1 commentaire ·