chore: log antigravity signature retry 429

This commit is contained in:
song
2026-01-17 18:22:53 +08:00
parent a7a0017aa8
commit 5e9f5efbe3

View File

@@ -871,6 +871,13 @@ func (s *AntigravityGatewayService) Forward(ctx context.Context, c *gin.Context,
retryBody, _ := io.ReadAll(io.LimitReader(retryResp.Body, 2<<20))
_ = retryResp.Body.Close()
if retryResp.StatusCode == http.StatusTooManyRequests {
retryBaseURL := ""
if retryReq.URL != nil {
retryBaseURL = retryReq.URL.Scheme + "://" + retryReq.URL.Host
}
log.Printf("%s status=429 rate_limited base_url=%s retry_stage=%s body=%s", prefix, retryBaseURL, stage.name, truncateForLog(retryBody, 200))
}
kind := "signature_retry"
if strings.TrimSpace(stage.name) != "" {
kind = "signature_retry_" + strings.ReplaceAll(stage.name, "+", "_")