From 6da3410823f482578af00ca1bc7859534e9c5117 Mon Sep 17 00:00:00 2001 From: JustSong Date: Thu, 18 May 2023 11:41:03 +0800 Subject: [PATCH] fix: fix channel test error checking --- controller/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/channel.go b/controller/channel.go index 1b863a0..3f04754 100644 --- a/controller/channel.go +++ b/controller/channel.go @@ -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