mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-29 20:12:31 +02:00
fix(channelserver): add error logging to silently ignored repo calls
19 repository calls across 8 handler files were silently discarding errors with `_ =`, making database failures invisible. Add structured logging at appropriate levels: Error for write operations where data loss may occur (guild saves, member updates), Warn for read operations where handlers continue with zero-value defaults (application checks, warehouse loads, item box queries). No control flow changes.
This commit is contained in:
@@ -202,7 +202,11 @@ func handleMsgMhfEnumerateRengokuRanking(s *Session, p mhfpacket.MHFPacket) {
|
||||
guild, _ := s.server.guildRepo.GetByCharID(s.charID)
|
||||
var isApplicant bool
|
||||
if guild != nil {
|
||||
isApplicant, _ = s.server.guildRepo.HasApplication(guild.ID, s.charID)
|
||||
var appErr error
|
||||
isApplicant, appErr = s.server.guildRepo.HasApplication(guild.ID, s.charID)
|
||||
if appErr != nil {
|
||||
s.logger.Warn("Failed to check guild application status", zap.Error(appErr))
|
||||
}
|
||||
}
|
||||
if isApplicant {
|
||||
guild = nil
|
||||
|
||||
Reference in New Issue
Block a user