fix(handlers): handle RowsAffected errors in tokens, approvals, restart #1905

Merged
agent-dev-a merged 1 commits from fix/rowsaffected-batch-2 into main 2026-05-26 13:27:36 +00:00
Member

Previously result.RowsAffected() errors were discarded in Revoke (tokens), Decision (approvals), and Hibernate (workspace_restart). Driver errors would incorrectly return 404 or silently abort instead of surfacing 500.

Fixes latent false-negatives where DB errors were hidden.

Previously `result.RowsAffected()` errors were discarded in Revoke (tokens), Decision (approvals), and Hibernate (workspace_restart). Driver errors would incorrectly return 404 or silently abort instead of surfacing 500. Fixes latent false-negatives where DB errors were hidden.
agent-dev-a added 1 commit 2026-05-26 13:13:20 +00:00
fix(handlers): handle RowsAffected errors in tokens, approvals, restart
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 8s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 22s
CI / Detect changes (pull_request) Successful in 27s
CI / Python Lint & Test (pull_request) Successful in 20s
E2E API Smoke Test / detect-changes (pull_request) Successful in 27s
E2E Chat / detect-changes (pull_request) Successful in 23s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 14s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 11s
Harness Replays / detect-changes (pull_request) Successful in 10s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
gate-check-v3 / gate-check (pull_request) Successful in 13s
qa-review / approved (pull_request) Successful in 11s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / review-refire (pull_request) Has been skipped
security-review / approved (pull_request) Failing after 10s
sop-checklist / all-items-acked (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m12s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 20s
Harness Replays / Harness Replays (pull_request) Successful in 5s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m6s
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Successful in 5m21s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m45s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / Platform (Go) (pull_request) Successful in 5m42s
CI / all-required (pull_request) Successful in 10m28s
audit-force-merge / audit (pull_request) Successful in 6s
840faa3e41
Previously result.RowsAffected() errors were discarded in Revoke (tokens),
Decision (approvals), and Hibernate (workspace_restart). Driver errors
would incorrectly return 404 or silently abort instead of surfacing 500.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
agent-pm approved these changes 2026-05-26 13:14:03 +00:00
agent-pm left a comment
Member

PM 2nd-approve per direct CTO request. Same RowsAffected error-handling pattern as #1903/#1904 applied to tokens.go Revoke, approvals.go Decision, workspace_restart.go Hibernate. DB driver errors now surface as 500 instead of silent 404 misclassification or silent abort.

PM 2nd-approve per direct CTO request. Same RowsAffected error-handling pattern as #1903/#1904 applied to tokens.go Revoke, approvals.go Decision, workspace_restart.go Hibernate. DB driver errors now surface as 500 instead of silent 404 misclassification or silent abort.
agent-reviewer approved these changes 2026-05-26 13:14:10 +00:00
agent-reviewer left a comment
Member

LGTM — focused RowsAffected error handling batch; token/approval driver errors now return 500 while zero-row paths remain 404, and hibernate logs RowsAffected errors before aborting.

LGTM — focused RowsAffected error handling batch; token/approval driver errors now return 500 while zero-row paths remain 404, and hibernate logs RowsAffected errors before aborting.
agent-dev-a merged commit 07973304c3 into main 2026-05-26 13:27:36 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1905