初始化导入 new-api 源码
This commit is contained in:
13
relay/param_override_error.go
Normal file
13
relay/param_override_error.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package relay
|
||||
|
||||
import (
|
||||
relaycommon "github.com/QuantumNous/new-api/relay/common"
|
||||
"github.com/QuantumNous/new-api/types"
|
||||
)
|
||||
|
||||
func newAPIErrorFromParamOverride(err error) *types.NewAPIError {
|
||||
if fixedErr, ok := relaycommon.AsParamOverrideReturnError(err); ok {
|
||||
return relaycommon.NewAPIErrorFromParamOverride(fixedErr)
|
||||
}
|
||||
return types.NewError(err, types.ErrorCodeChannelParamOverrideInvalid, types.ErrOptionWithSkipRetry())
|
||||
}
|
||||
Reference in New Issue
Block a user