Check rows.Err() after the timeline scan loop (#27)

This commit is contained in:
Niklas Ye
2026-10-08 08:58:19 +02:00
parent 0aaea8efb5
commit dc62278788
+4
View File
@@ -189,6 +189,10 @@ func handleIncidentTimeline(db *sql.DB) http.HandlerFunc {
e.CreatedAt = time.Unix(ts, 0).UTC() e.CreatedAt = time.Unix(ts, 0).UTC()
events = append(events, e) events = append(events, e)
} }
if err := rows.Err(); err != nil {
respond(w, http.StatusInternalServerError, errResp("internal error"))
return
}
respond(w, http.StatusOK, events) respond(w, http.StatusOK, events)
} }
} }