Commit 14662c3f by JustSong

fix: fix channel test error checking

parent 8cd4e3fa
...@@ -201,7 +201,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error { ...@@ -201,7 +201,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
if err != nil { if err != nil {
return err 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 errors.New(fmt.Sprintf("type %s, code %s, message %s", response.Error.Type, response.Error.Code, response.Error.Message))
} }
return nil return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment