Skip to content

Commit cc9451c

Browse files
docs: follow the API's shorter 429 wording (0.11.2 / cli 0.8.2) (#25)
The per-minute message now says "Please retry after 1 minute" rather than explaining the fixed window inline, and both messages ask politely. The SDK and CLI READMEs quote them verbatim, so they move together — a quoted sentence the server no longer sends is the exact problem this round set out to fix. The window explanation moves into the prose around the quote, where it reads as background rather than as an error message. No runtime change; the errors test that pins verbatim passthrough is updated to the new text. Patch bumps on both packages so the READMEs reach PyPI.
1 parent 969c1f7 commit cc9451c

5 files changed

Lines changed: 17 additions & 18 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,16 @@ The class and `.code` (`rate_limit_exceeded`) are identical for both — only
475475
the message tells them apart:
476476

477477
- **Requests per minute** — `Rate limit exceeded: your account allows 60
478-
requests per minute. Rejected requests count toward the limit too, so wait
479-
for the next minute window (up to 60 sec) rather than retrying right away.
480-
To raise your limit, contact info@sonilo.com.` Calls are going out too fast.
481-
The counter runs on a fixed 60-second window, so back off past the window
482-
boundary instead of retrying inside it.
478+
requests per minute. Please retry after 1 minute. To raise your limit,
479+
please contact info@sonilo.com.` Calls are going out too fast. The counter
480+
runs on a fixed 60-second window and rejected requests count toward it too,
481+
so a retry inside the window cannot succeed — a full minute always clears
482+
it, whatever your phase within the window.
483483
- **Concurrent generations** — `Too many concurrent generations: 5 of 5 in
484-
progress. Wait for one to finish before starting another. To raise your
485-
limit, contact info@sonilo.com.` Every generation slot is busy. Waiting
486-
alone frees nothing — retry when one of your own in-flight generations
487-
finishes, not on a timer.
484+
progress. Please wait for one to finish before starting another. To raise
485+
your limit, please contact info@sonilo.com.` Every generation slot is busy.
486+
Waiting alone frees nothing — retry when one of your own in-flight
487+
generations finishes, not on a timer.
488488

489489
The numbers are the account's own limits; `account.services()` reports them
490490
as `rpm_limit` and `concurrency_limit`. Email info@sonilo.com to raise

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "sonilo"
7-
version = "0.11.1"
7+
version = "0.11.2"
88
description = "Official Python client for the Sonilo API"
99
readme = "README.md"
1010
license = "MIT"

sonilo-cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ That is the one 402 a retry can never fix.
187187
Two separate limits return `HTTP 429`, and they want opposite handling. The CLI prints the API's
188188
own sentence, so the wording says which one you hit:
189189

190-
sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Rejected requests count toward the limit too, so wait for the next minute window (up to 60 sec) rather than retrying right away. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded)
191-
sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Wait for one to finish before starting another. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded)
190+
sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Please retry after 1 minute. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded)
191+
sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Please wait for one to finish before starting another. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded)
192192

193193
The first means calls are going out too fast. The counter runs on a fixed 60-second window and
194194
rejected calls count toward it too, so wait the window out instead of retrying inside it. The

sonilo-cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "sonilo-cli"
7-
version = "0.8.1"
7+
version = "0.8.2"
88
description = "Command-line interface for the Sonilo API: generate music and sound effects from text or video"
99
readme = "README.md"
1010
license = "MIT"

tests/test_errors.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,11 @@ def test_429_without_header_has_no_retry_after():
143143
"message",
144144
[
145145
"Rate limit exceeded: your account allows 60 requests per minute. "
146-
"Rejected requests count toward the limit too, so wait for the next "
147-
"minute window (up to 60 sec) rather than retrying right away. "
148-
"To raise your limit, contact info@sonilo.com.",
149-
"Too many concurrent generations: 5 of 5 in progress. Wait for one to "
150-
"finish before starting another. To raise your limit, contact "
146+
"Please retry after 1 minute. To raise your limit, please contact "
151147
"info@sonilo.com.",
148+
"Too many concurrent generations: 5 of 5 in progress. Please wait for "
149+
"one to finish before starting another. To raise your limit, please "
150+
"contact info@sonilo.com.",
152151
],
153152
)
154153
def test_429_carries_the_message_through_verbatim(message):

0 commit comments

Comments
 (0)