rate: The per-second allowance is used up
The stream's allowance accrues at its rate per second from the moment it opens. What the stream has already billed, plus what it holds in reservations, plus this request, is more than its rate times the seconds since it opened. Held reservations count as spent, so a confirm can never go past the allowance later.
What to do
- Retry after a short wait.
- A new stream's first request needs about one second of accrual when its rate equals its cap.
In a stream's first seconds
A stream's spending allowance builds up per second from its open, so a payment in the same second as the open is refused with rate (nothing is billed). Open the stream before the work starts; on a rate refusal, wait a second and retry.
A call in the first seconds of a stream may return 409 rate. On a stablecoin stream the allowance starts at the block time of the transaction that opened it, and a chain's block time can be a little ahead of the server's clock. Nothing is billed and no voucher is signed; the stream stays open.
- Retry after 1-2 seconds with the same
requestRef. A retry bills the work at most once. - Keep the server's clock synced (NTP).
On the wire
HTTP 409, error type halted.
With Dynamo-Error-Detail: 1, and on the routes added in owner-api 1.4.0 and later (for example payment authorizations) with or without it:
{
"error": "halted",
"reason": "rate",
"streamId": "stm_…",
"detail": "…",
"errorDetail": {
"type": "halted",
"code": "rate",
"message": "…",
"param": null,
"doc_url": "…/errors/rate.md",
"fix": "the per-second rate allowance is used up; retry after it accrues"
}
}
On the older routes without the header, including the plugin wire's meter, the body has no errorDetail.
See all error codes.