mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 11:38:38 +00:00
Fix error message for invalid API key format
This commit is contained in:
@@ -107,7 +107,7 @@ var responseFormatToEncodingMap = map[string]string{
|
|||||||
func parseVolcengineAuth(apiKey string) (appID, token string, err error) {
|
func parseVolcengineAuth(apiKey string) (appID, token string, err error) {
|
||||||
parts := strings.Split(apiKey, "|")
|
parts := strings.Split(apiKey, "|")
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
return "", "", errors.New("invalid api key format, expected: appid:access_token")
|
return "", "", errors.New("invalid api key format, expected: appid|access_token")
|
||||||
}
|
}
|
||||||
return parts[0], parts[1], nil
|
return parts[0], parts[1], nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user