schedule_needs_approval
POST /v1/actions carried a schedule whose not_before is more than 60 seconds away, and the policy decided allow.
HTTP 403 · policy_error · not retryable
What happened
Section titled “What happened”POST /v1/actions carried a schedule whose not_before is more than 60 seconds away, and the policy decided allow. An allowed action runs at once, so it would run before its window: Deedglass denies it and seals the deed instead. A scheduled action must go through require_approval; an automatic sender submits each action at its slot instead, with not_before at most 60 seconds ahead.
What to do
Section titled “What to do”Add require_approval to the rule that matches, or drop the schedule, or submit the action when its window opens.
Example
Section titled “Example”{ "error": { "type": "policy_error", "code": "schedule_needs_approval", "message": "A scheduled action must wait for an approval. This policy allows it now, so it would run early. Add require_approval to the rule, or drop the schedule.", "param": null, "request_id": "req_01j9zr3m5k8q2w7x4t6v0b1c9d", "doc_url": "https://docs.deedglass.com/errors/schedule_needs_approval" }}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 === "schedule_needs_approval" |
Python (deedglass) |
deedglass.PolicyDeniedError with .code == "schedule_needs_approval" |