diff --git a/internal/api/handlers/claude/code_handlers.go b/internal/api/handlers/claude/code_handlers.go index bbafdd47..d3f0e61b 100644 --- a/internal/api/handlers/claude/code_handlers.go +++ b/internal/api/handlers/claude/code_handlers.go @@ -17,6 +17,7 @@ import ( . "github.com/luispater/CLIProxyAPI/internal/constant" "github.com/luispater/CLIProxyAPI/internal/interfaces" "github.com/luispater/CLIProxyAPI/internal/registry" + "github.com/luispater/CLIProxyAPI/internal/util" log "github.com/sirupsen/logrus" "github.com/tidwall/gjson" ) @@ -193,7 +194,7 @@ outLoop: continue outLoop // Restart the client selection process } case 403, 408, 500, 502, 503, 504: - log.Debugf("http status code %d, switch client", errInfo.StatusCode) + log.Debugf("http status code %d, switch client, %s", errInfo.StatusCode, util.HideAPIKey(cliClient.GetEmail())) retryCount++ continue outLoop default: diff --git a/internal/client/claude_client.go b/internal/client/claude_client.go index f73f18dd..2b1137e4 100644 --- a/internal/client/claude_client.go +++ b/internal/client/claude_client.go @@ -535,7 +535,7 @@ func (c *ClaudeClient) GetEmail() string { if ts, ok := c.tokenStorage.(*claude.ClaudeTokenStorage); ok { return ts.Email } else { - return "" + return c.cfg.ClaudeKey[c.apiKeyIndex].APIKey } }