Skip to content

fix: handle registry rate limiting with retry and backoff #222

@breferrari

Description

@breferrari

Problem

The GitHub registry client in registry.rs treats HTTP 429 (rate limit) responses as fatal errors. Unauthenticated GitHub API requests are limited to 60/hour, and even authenticated requests are capped at 5,000/hour.

Impact

A user running multiple weave install or weave search commands in quick succession (or in CI) can hit rate limits and get opaque RegistryHttp { status: 429 } errors with no guidance.

Proposed solution

  1. Parse Retry-After header on 429 responses
  2. Implement exponential backoff with 2-3 retries
  3. On persistent rate limit, show a clear message: "GitHub API rate limit reached. Run weave auth login for higher limits, or wait N seconds."
  4. Consider adding If-None-Match / ETag caching to reduce request count

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions