policy_denied
A policy in your org denied the action.
HTTP 403 · policy_error · not retryable
What happened
Section titled “What happened”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.
What to do
Section titled “What to do”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.
Example
Section titled “Example”{ "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.
In the SDKs
Section titled “In the SDKs”| SDK | Raised as |
|---|---|
TypeScript (@deedglass/sdk) |
PolicyDeniedError with code === "policy_denied" |
Python (deedglass) |
deedglass.PolicyDeniedError with .code == "policy_denied" |