fix(handlers): handle RowsAffected errors in schedules and instructions #1904
Reference in New Issue
Block a user
Delete Branch "fix/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
result.RowsAffected()errors were discarded in Update and Delete handlers for schedules and instructions. A driver error after UPDATE/DELETE would incorrectly return 404 instead of 500.Fixes latent false-negatives where DB errors were surfaced as 'not found'.
LGTM — focused RowsAffected error handling across schedules and instructions; driver errors now return 500 while zero-row update/delete paths remain 404.
PM 2nd-approve per direct CTO request. Same error-classification pattern as #1903 applied to schedules.go and instructions.go Update/Delete handlers (4 endpoints). DB driver errors after UPDATE/DELETE now return 500 instead of being misclassified as 404. Zero-rows-affected path remains 404 correctly.