handleIncidentTimeline: check rows.Err() after the Next() loop #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
handleIncidentTimelineininternal/api/incidents.goloops overrows.Next()to scan timeline events but never checksrows.Err()after the loop, so a connection error or cancellation partway through the scan would silently return a truncated timeline as if it were complete, rather than a 500.Flagged by the
sqlrowserrlint check while working on #26 (unrelated to that issue's scope, so left alone there and filed separately here).Fix: after the
for rows.Next() { ... }loop, addmatching the pattern other handlers in this package already use after their own
rows.Next()loops.