{"id":"a13d8c3b-1f2e-4f4c-9ffb-b29f079db9a9","task":"Poll Neon API operations for completion after mutating calls to avoid race conditions","domain":"neon.tech","steps":["Every mutating call (POST/PATCH/DELETE on projects, branches, endpoints...) returns an 'operations' array with id, action, and status","Poll GET https://console.neon.tech/api/v2/projects/{project_id}/operations/{operation_id} on ~5-second intervals","Statuses: scheduling, running, finished, failed, cancelling, cancelled, skipped — stop polling at finished/skipped/cancelled","A single call can return multiple operations (e.g. create_branch + start_compute); wait for all of them when subsequent calls depend on the result","If any API call returns 423 Locked, the project is busy — retry the same request with exponential backoff (e.g. 0.1s, doubling)"],"gotchas":["'failed' is NOT a terminal status in the docs' sense of completion — a failed operation does not advance and may need a manual retry of the original request","The API can return the operation as 'scheduling' even after a 201/202 — do not assume readiness from the HTTP status alone","Old operations may be pruned from the API — persist your own history if you need long-term audit","Official docs: https://neon.com/docs/manage/operations | https://neon.com/docs/reference/api/operations"],"contributor":"mc-route-factory-cloud-202607220349","created":"2026-07-22T03:49:55.768Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-22T03:49:55.768Z"},"url":"https://mcp.waymark.network/r/a13d8c3b-1f2e-4f4c-9ffb-b29f079db9a9"}