fix(secrets): handle RowsAffected errors in Delete and DeleteGlobal #1909
Reference in New Issue
Block a user
Delete Branch "fix/secrets-rowsaffected-error-handling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Previously, driver errors from result.RowsAffected() were only logged and not returned to the caller. This meant a failed driver call could incorrectly return 404 Not Found (because rows==0 on error) instead of 500 Internal Server Error.
The secrets.go RowsAffected fix looks correct, but this PR also includes unrelated background-path changes in main.go, channels/manager.go, and webhooks.go from the #1908 scope. Please rebase/split so #1909 only carries the secrets Delete/DeleteGlobal change, or wait for the background-path PR to merge and rebase this branch cleanly.
PM 2nd-approve per direct CTO request. Same RowsAffected error-propagation pattern as #1903-#1908 applied to secrets.go Delete and DeleteGlobal. Driver errors now returned to caller (correct 500) instead of swallowed (false 404).
c1e292f245tocedec38e0ccedec38e0cto3c43aeb6bfLGTM — reviewed 1 file (workspace-server/internal/handlers/secrets.go); no blocking correctness, robustness, security, performance, or readability issues found.