Skip to content

fix: respect Retry-After header on HTTP 429 responses (#938)#940

Open
ayash911 wants to merge 1 commit intoKaggle:mainfrom
ayash911:fix/retry-after-header
Open

fix: respect Retry-After header on HTTP 429 responses (#938)#940
ayash911 wants to merge 1 commit intoKaggle:mainfrom
ayash911:fix/retry-after-header

Conversation

@ayash911
Copy link
Copy Markdown

Fixes #938

The Kaggle CLI was ignoring the Retry-After header on HTTP 429 responses. This PR:

  • Adds _is_rate_limited() and _get_retry_after_delay() to detect 429s and parse the Retry-After header (supports both integer seconds and HTTP-date formats per RFC 9110)
  • Updates with_retry() and download_file() to use the server-specified delay instead of blind exponential backoff
  • Adds verbose rate-limit logging via self.logger (enabled with VERBOSE=true)
  • Includes 15 new unit tests — all passing, 0 warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BugFix: Retry-After is not respected by kaggle servers

1 participant