fix: disable channel with a whitelist

This commit is contained in:
JustSong
2023-05-21 20:58:00 +08:00
parent 17b7646c12
commit d9e39f5906
2 changed files with 3 additions and 3 deletions

View File

@@ -201,7 +201,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
if err != nil {
return err
}
if response.Error.Message != "" {
if response.Error.Message != "" || response.Error.Code != "" {
return errors.New(fmt.Sprintf("type %s, code %s, message %s", response.Error.Type, response.Error.Code, response.Error.Message))
}
return nil