task_payment_pending: Accepted work is not yet paid
A revoke or budget close first pays every accepted milestone of every task whose stream the action reaches through a signed voucher. When one of those payments cannot be signed yet (for example the stream's rate has not yet reached the accepted units, or the stream is frozen), the revoke or close is refused and nothing is halted or closed. A freeze is never refused for this reason, and neither is an emergency stop: in revoke mode it holds the budget until the owed work is paid, then completes (see the Task Allowance).
What to do
- Accepted task work is paid before the stream is revoked; retry once the payment can be signed (the stream's rate allows it, or thaw it first), or freeze instead.
On the wire
HTTP 409, error type state_error.
The emergency stop (POST /owner/v1/budgets/{id}/stop) never answers this code. A revoke (POST /owner/v1/streams/{id}/revoke) or a budget close (POST /owner/v1/budgets/{id}/close) answers {"error": "state", "reason": "task_payment_pending", "detail": "…"} and adds errorDetail only when the request sends Dynamo-Error-Detail: 1:
{
"error": "state",
"reason": "task_payment_pending",
"detail": "…",
"errorDetail": {
"type": "state_error",
"code": "task_payment_pending",
"message": "…",
"param": "task",
"doc_url": "…/errors/task_payment_pending.md",
"fix": "accepted task work is paid before the stream is revoked; retry once the payment can be signed (the stream's rate allows it, or thaw it first), or freeze instead"
}
}
See the Task Allowance and all error codes.