mandate_category: The category is outside the mandate

The delegation names a category that its delegator's mandate does not allow, or names no category while the delegator's mandate lists its categories. Nothing was opened.

The same code answers preparing a user-owned budget (POST /owner/v1/budgets/adopt-prepare) whose root category is outside, or missing from, the budget's own mandate. Nothing is prepared.

What to do

On the wire

HTTP 409, error type mandate_error.

On a stream open or delegation, a human payment or a user-owned budget preparation, a client that does not send Dynamo-Error-Detail: 1 gets {"error": "mandate", "reason": "mandate_category", "detail": "…"}: the precise reason, without errorDetail. The child adoption preparation (POST /owner/v1/streams/{id}/children/adopt-prepare) sends errorDetail to every client. The plugin wire's child open (POST /plugin/v1/streams/{id}/children) answers HTTP 409 {"error": "child open refused (fail closed)", "reason": "mandate_category"}, with no detail and no errorDetail.

The detailed body:

{
  "error": "mandate",
  "reason": "mandate_category",
  "detail": "…",
  "errorDetail": {
    "type": "mandate_error",
    "code": "mandate_category",
    "message": "…",
    "param": "mandate",
    "doc_url": "…/errors/mandate_category.md",
    "fix": "the requested category is outside the delegator's mandate"
  }
}

See all error codes.