carlos / platform Public

console: log the dropped VersionCandidates error in fillEligible

The sibling PruneEligible error already logs; the VersionCandidates
error that feeds Total was vanishing silently on failure, making a
missing total field undebuggable. Response shape unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 05823e3bb654a75d15c138441a00eeee69ecc3e2 parent 3dff97f
1 file changed, +2 −0
  • internal/console/apiretention.go +2 −0
diff --git a/internal/console/apiretention.go b/internal/console/apiretention.go
index 9800da875..edd321fb2 100644
--- a/internal/console/apiretention.go
+++ b/internal/console/apiretention.go
@@ -50,6 +50,8 @@ func (s *Server) fillEligible(ctx context.Context, resp *apiRetentionResponse, a
resp.Eligible = &n
if versions, _, err := release.VersionCandidates(ctx, s.cfg.Releases, acct, app, math.MaxInt); err == nil {
resp.Total = len(versions)
+ } else {
+ log.Printf("console: api retention total %s/%s: %v", acct, app, err)
}
resp.EligibleVersions = eligible
}