fix(queue): catch ApiError in main() so transient failures dont crash workflow #1045

Merged
devops-engineer merged 2 commits from fix/queue-script-error-handling into main 2026-05-14 17:09:13 +00:00

2 Commits

Author SHA1 Message Date
8ec2f4f33d chore: trigger CI re-eval
All checks were successful
CI / Platform (Go) (pull_request) Successful in 3m12s
E2E API Smoke Test / detect-changes (pull_request) Successful in 17s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 20s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 5s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 4s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 3s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m11s
CI / all-required (pull_request) Successful in 3m45s
CI / Detect changes (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 2m18s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 22s
CI / Python Lint & Test (pull_request) Successful in 1m5s
CI / Canvas Deploy Reminder (pull_request) Successful in 8s
gate-check-v3 / gate-check (pull_request) No blocking conditions
Block internal-flavored paths / Block forbidden paths (pull_request) No forbidden paths
lint-required-no-paths / lint-required-no-paths (pull_request) No paths filter on required workflows
Secret scan / Scan diff for credential-shaped strings (pull_request) No credentials found
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 7/7
sop-checklist / na-declarations (pull_request) N/A: n/a
sop-tier-check / tier-check (pull_request) tier:low
qa-review / approved (pull_request) Approved
security-review / approved (pull_request) Approved
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-14 10:06:18 -07:00
6baeb1f7e2 fix(queue): catch ApiError in main() so transient failures don't crash the workflow
The queue script exits with code 1 when any api() call raises ApiError
(e.g. 401/403 from missing/wrong AUTO_SYNC_TOKEN, or network errors).
Since the queue runs every 5 minutes, returning non-zero permanently
fails the workflow run and blocks all future ticks.

Fix: wrap process_once() call in main() with try/except catching
ApiError, URLError, and TimeoutError. Log via ::error:: annotation
and return 0 so the workflow is marked success and the next tick
can retry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 10:06:18 -07:00