修复登录状态码匹配错误时返回的error为nil 🐛

This commit is contained in:
eatMoreApple 2021-04-21 21:32:01 +08:00
parent 945c8ad493
commit 9bab331b4a

View File

@ -53,10 +53,10 @@ func (c *Caller) CheckLogin(uuid string) (*CheckLoginResponse, error) {
return nil, err
}
// 正则匹配检测的code
// 具体code参考
// 具体code参考global.go
results := statusCodeRegexp.FindSubmatch(data)
if len(results) != 2 {
return nil, nil
return nil, errors.New("error status code match")
}
code := string(results[1])
return &CheckLoginResponse{Code: code, Raw: data}, nil