mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-19 04:40:52 +08:00
Fix some bugs.
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
|||||||
. "github.com/luispater/CLIProxyAPI/internal/constant"
|
. "github.com/luispater/CLIProxyAPI/internal/constant"
|
||||||
"github.com/luispater/CLIProxyAPI/internal/interfaces"
|
"github.com/luispater/CLIProxyAPI/internal/interfaces"
|
||||||
"github.com/luispater/CLIProxyAPI/internal/registry"
|
"github.com/luispater/CLIProxyAPI/internal/registry"
|
||||||
|
"github.com/luispater/CLIProxyAPI/internal/util"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/tidwall/gjson"
|
"github.com/tidwall/gjson"
|
||||||
)
|
)
|
||||||
@@ -193,7 +194,7 @@ outLoop:
|
|||||||
continue outLoop // Restart the client selection process
|
continue outLoop // Restart the client selection process
|
||||||
}
|
}
|
||||||
case 403, 408, 500, 502, 503, 504:
|
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++
|
retryCount++
|
||||||
continue outLoop
|
continue outLoop
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ func (c *ClaudeClient) GetEmail() string {
|
|||||||
if ts, ok := c.tokenStorage.(*claude.ClaudeTokenStorage); ok {
|
if ts, ok := c.tokenStorage.(*claude.ClaudeTokenStorage); ok {
|
||||||
return ts.Email
|
return ts.Email
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return c.cfg.ClaudeKey[c.apiKeyIndex].APIKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user