policy_invalid: The policy document is malformed
The document is not a dynamo-policy-v1 document: an unknown field, a malformed value, or rules that name nothing. Nothing changed.
A request whose body is not the route's shape (a missing document, a malformed binding scope, or a dry-run action whose serviceNode is not an address or whose capUnits or units is not a decimal digit string) answers 400 invalid_request before the document is read.
What to do
- The policy document is malformed (dynamo-policy-v1: scope, version, rules with known fields only); nothing changed.
On the wire
HTTP 409, error type state_error. Without Dynamo-Error-Detail: 1 every client receives {"error": "state", "reason": "policy_invalid", "detail": "…"} with no errorDetail: the policy routes add it only when the request sends that header, on a single-tenant core and on the hosted tier alike.
With Dynamo-Error-Detail: 1:
{
"error": "state",
"reason": "policy_invalid",
"detail": "…",
"errorDetail": {
"type": "state_error",
"code": "policy_invalid",
"message": "…",
"param": "policy",
"doc_url": "…/errors/policy_invalid.md",
"fix": "the policy document is malformed (dynamo-policy-v1: scope, version, rules with known fields only); nothing changed"
}
}
See policies and all error codes.