undo_unavailable
POST /v1/actions/{id}/undo previewed the undo again and at least one of the twelve checks failed: the action wasn’t witnessed at L2, the connector is gone, a row changed since, a trigger would fire…
HTTP 409 · invalid_request_error · not retryable
What happened
Section titled “What happened”POST /v1/actions/{id}/undo previewed the undo again and at least one of the twelve checks failed: the action wasn’t witnessed at L2, the connector is gone, a row changed since, a trigger would fire again, and so on. The additive error.checks field lists every check, each with its fix and, where it helps, SQL to copy.
What to do
Section titled “What to do”Run deedglass undo preview act_…, fix each failing check, preview again, and send the new plan_digest.
Example
Section titled “Example”{ "error": { "type": "invalid_request_error", "code": "undo_unavailable", "message": "Undo isn't available for act_01j9zw6k…: 1 check failed (triggers). Run deedglass undo preview act_01j9zw6kq3m8n2p4r6t8v0x2z4 for the fix.", "param": null, "checks": [ { "id": "triggers", "title": "Triggers", "status": "fail", "detail": "public.orders has trigger orders_bulk_touch. Undo would fire this trigger again.", "fix": "An admin can pass allow_triggers with a reason; the L2 witness then shows what the trigger did.", "fix_sql": "ALTER TABLE public.orders DISABLE TRIGGER orders_bulk_touch;", "doc_url": "https://docs.deedglass.com/undo#the-twelve-checks" } ], "request_id": "req_01j9zr3m5k8q2w7x4t6v0b1c9d", "doc_url": "https://docs.deedglass.com/errors/undo_unavailable" }}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) |
InvalidRequestError with code === "undo_unavailable" |
Python (deedglass) |
deedglass.InvalidRequestError with .code == "undo_unavailable" |