mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-04 05:13:41 +08:00
fix: fix channel test error checking
This commit is contained in:
@@ -201,7 +201,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if response.Error.Type != "" {
|
||||
if response.Error.Message != "" {
|
||||
return errors.New(fmt.Sprintf("type %s, code %s, message %s", response.Error.Type, response.Error.Code, response.Error.Message))
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user