Skip to content

policy_denied

A policy in your org denied the action.

HTTP 403 · policy_error · not retryable

A policy in your org denied the action. The message names the rule and gives its reason; it is the decision’s own sentence, verbatim. On POST /v1/actions the refusal is recorded and sealed before the answer, and the envelope carries the sealed action in error.action (status: denied, its deed, and the decision with the rule id). Nothing ran.

Read the reason. Change the request so the rule allows it, or ask an admin to change the policy. Sending the same request again gets the same answer.

HTTP 403 · policy_denied
{
"error": {
"type": "policy_error",
"code": "policy_denied",
"message": "Blocked by policy \"block-destructive-sql\": DROP is never allowed for agents.",
"param": null,
"request_id": "req_01j9zr3m5k8q2w7x4t6v0b1c9d",
"doc_url": "https://docs.deedglass.com/errors/policy_denied"
}
}

The message is for a person and can get more exact over time: branch on type and code, never on the message.

SDK Raised as
TypeScript (@deedglass/sdk) PolicyDeniedError with code === "policy_denied"
Python (deedglass) deedglass.PolicyDeniedError with .code == "policy_denied"