mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 17:43:21 +01:00
fix(channelserver): handle silently swallowed DB scan and exec errors
Several handlers discarded errors from rows.Scan() and db.Exec(), masking data corruption or connection issues. Scan failures in diva schedule, event quests, and trend weapons are now logged or returned. InitializeWarehouse now surfaces its insert error to the caller.
This commit is contained in:
@@ -84,7 +84,9 @@ func handleMsgMhfGetUdSchedule(s *Session, p mhfpacket.MHFPacket) {
|
||||
} else {
|
||||
defer func() { _ = rows.Close() }()
|
||||
for rows.Next() {
|
||||
_ = rows.Scan(&id, &start)
|
||||
if err := rows.Scan(&id, &start); err != nil {
|
||||
s.logger.Error("Failed to scan diva schedule row", zap.Error(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user