fix response error

This commit is contained in:
eatmoreapple 2022-11-30 18:31:26 +08:00
parent b18242699a
commit 5b35d2014a

View File

@ -25,8 +25,8 @@ func (b BaseResponse) Ok() bool {
}
func (b BaseResponse) Err() error {
if b.Ok() || len(b.ErrMsg) == 0 {
if b.Ok() {
return nil
}
return errors.New(b.ErrMsg)
return errors.New(b.Ret.String())
}