mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-26 09:33:02 +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:
@@ -261,7 +261,10 @@ func handleMsgMhfGetTrendWeapon(s *Session, p mhfpacket.MHFPacket) {
|
||||
j := 0
|
||||
for rows.Next() {
|
||||
trendWeapons[i][j].WeaponType = i
|
||||
_ = rows.Scan(&trendWeapons[i][j].WeaponID)
|
||||
if err := rows.Scan(&trendWeapons[i][j].WeaponID); err != nil {
|
||||
s.logger.Error("Failed to scan trend weapon", zap.Error(err))
|
||||
break
|
||||
}
|
||||
j++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user