(c *gin.Context, channelError types.ChannelError, err *types.NewAPIError)
| 320 | } |
| 321 | |
| 322 | func 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 | |
| 331 | func RelayMidjourney(c *gin.Context) { |
| 332 | relayMode := c.GetInt("relay_mode") |
no test coverage detected