amend_floor: The new cap or limit is below committed work
An amendment may not cut a cap below what is already billed plus what is acknowledged and reserved, because that work belongs to the payee. Child streams are cut to fit the new cap, each never below its own committed work; when they cannot all fit, the amendment is refused. On the stablecoin escrow a revoked child's whole cap still counts against the new cap, because a revoked cap is not returned there.
The same holds for limits. A change that would leave a held reservation above a new limit is refused, and detail names the reservation:
- a per-transaction maximum below the largest held reservation it governs;
- a per-period maximum below the period's billed units plus the held units, while anything is held.
This applies to every way a limit can narrow: a mandate amendment, a policy set at budget, team or organisation scope, binding a budget to a scope with a policy, assigning a budget to a team (the assignment is not recorded), and bringing a lagging book level with the current policy. When one book refuses, no book is written.
What to do
- Choose a cap at or above the stream's committed amount (the network view shows billed and reserved amounts).
- For a limit, release the held reservation or let it settle (confirm it), then make the change again.
- To stop spending at once, freeze, stop or revoke instead: those act immediately, with reservations held.
On the wire
HTTP 409, error type state_error.
The amend route (POST /owner/v1/streams/{id}/amend) sends errorDetail to every client. The policy and organisation routes send it only to a client that sends Dynamo-Error-Detail: 1; other clients get {"error": "state", "detail": "…"}, with no reason. The detailed body:
{
"error": "state",
"detail": "…",
"errorDetail": {
"type": "state_error",
"code": "amend_floor",
"message": "…",
"param": null,
"doc_url": "…/errors/amend_floor.md",
"fix": "a cap may not go below billed plus acknowledged work"
}
}
See all error codes.