MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / processChannelError

Function processChannelError

controller/relay.go:322–329  ·  view source on GitHub ↗
(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError)

Source from the content-addressed store, hash-verified

320}
321
322func processChannelError(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError) {
323 // 不要使用context获取渠道信息,异步处理时可能会出现渠道信息不一致的情况
324 // do not use context to get channel info, there may be inconsistent channel info when processing asynchronously
325 common.LogError(c, fmt.Sprintf("relay error (channel #%d, status code: %d): %s", channelError.ChannelId, err.StatusCode, err.Error()))
326 if service.ShouldDisableChannel(channelError.ChannelId, err) && channelError.AutoBan {
327 service.DisableChannel(channelError, err.Error())
328 }
329}
330
331func RelayMidjourney(c *gin.Context) {
332 relayMode := c.GetInt("relay_mode")

Callers 4

testAllChannelsFunction · 0.85
RelayFunction · 0.85
WssRelayFunction · 0.85
RelayClaudeFunction · 0.85

Calls 4

LogErrorFunction · 0.92
ShouldDisableChannelFunction · 0.92
DisableChannelFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected