Skip to content

add configurable default_retry_after parameter#9

Merged
ALERTua merged 1 commit intomainfrom
retry_after_default
Feb 1, 2026
Merged

add configurable default_retry_after parameter#9
ALERTua merged 1 commit intomainfrom
retry_after_default

Conversation

@ALERTua
Copy link
Copy Markdown
Owner

@ALERTua ALERTua commented Feb 1, 2026

Adds a configurable default_retry_after parameter to BandcampAPIClient for customizing the fallback retry duration when rate limited (HTTP 429) without a Retry-After header. Changes the default from 30 to 10 seconds for faster recovery.

Changes

  • Added default_retry_after: int = 10 parameter to BandcampAPIClient.__init__()
  • Updated rate limit handling to use the configurable default
  • Updated test assertions to expect the new 10 second default

Add default_retry_after parameter to BandcampAPIClient.init() to
allow customization of the fallback value when the Retry-After header
is missing from a 429 rate limit response. The default is changed
from 30 to 10 seconds for improved responsiveness.

Update tests/test_client.py assertions to expect the new 10 second
default value in:

test_rate_limit_error_default_retry_after
test_rate_limit_error_invalid_retry_after
@ALERTua ALERTua merged commit 8abba90 into main Feb 1, 2026
6 checks passed
@ALERTua ALERTua deleted the retry_after_default branch February 1, 2026 12:07
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.

1 participant