fix(clients): surface bulk-reset auto-enable failures (#5763)

* fix(clients): surface bulk-reset auto-enable failures

BulkResetTraffic re-enables a disabled client before resetting its
traffic, but discarded the s.Update result with `_, _ =`, so a failed
re-enable was silent: the client stayed disabled with nothing logged,
unlike the single-client ResetTraffic path which already warns on the
same call. Check the error and log a warning to match, and add a
regression test covering BulkResetTraffic's previously-untested
re-enable path.

* ci: update Go toolchain for govulncheck

---------

Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
n0ctal
2026-07-08 23:53:42 +05:00
committed by GitHub
parent 567a4ac4fe
commit 7c183dbd97
3 changed files with 33 additions and 2 deletions
+3 -1
View File
@@ -84,7 +84,9 @@ func (s *ClientService) BulkResetTraffic(inboundSvc *InboundService, emails []st
if err == nil && !rec.Enable {
updated := rec.ToClient()
updated.Enable = true
_, _ = s.Update(inboundSvc, rec.Id, *updated)
if _, uErr := s.Update(inboundSvc, rec.Id, *updated); uErr != nil {
logger.Warning("Failed to auto-enable client during bulk traffic reset:", uErr)
}
}
}