cap: The spending cap is reached
The request does not fit the stream's remaining cap, an ancestor stream's remaining cap, or the budget's remaining headroom. Nothing was billed for it.
What to do
- With
Dynamo-Error-Detail: 1,errorDetail.headroomshowsremainingCapUnitsandremainingNetworkUnits. - Send a smaller request, or open a new stream or budget with room. A running cap can only be narrowed, never raised.
On the wire
HTTP 409, error type halted.
A client that does not send Dynamo-Error-Detail: 1 gets the same body without errorDetail (and so without headroom), except on the payment authorization and receipt routes and the test-fixture run route (POST /owner/v1/test-fixtures/streams/{id}/run), which send it to every client. The detailed body:
{
"error": "halted",
"reason": "cap",
"streamId": "stm_…",
"detail": "…",
"errorDetail": {
"type": "halted",
"code": "cap",
"message": "…",
"param": null,
"doc_url": "…/errors/cap.md",
"fix": "the spending cap is reached; raise headroom with a new budget or stream",
"headroom": {
"remainingCapUnits": "1200",
"remainingNetworkUnits": "53000"
}
}
}
On the routes that predate 1.4.0, a client that has not opted in also sees cap for the newer spending refusals mandate_payee, mandate_assurance, mandate_verification, mandate_window, mandate_limit, policy and approval_required, so the 1.3.0 response shape is unchanged. Send Dynamo-Error-Detail: 1 to get the precise reason. The one exception is policy: a client pinned at Dynamo-Version 1.8.0 or later sees policy even without the header. On the multi-tenant hosted tier a request that names no version is served the account's default (1.8.0 for new accounts), so it sees policy too.
See all error codes.