fix response error
This commit is contained in:
parent
b18242699a
commit
5b35d2014a
@ -25,8 +25,8 @@ func (b BaseResponse) Ok() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b BaseResponse) Err() error {
|
func (b BaseResponse) Err() error {
|
||||||
if b.Ok() || len(b.ErrMsg) == 0 {
|
if b.Ok() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return errors.New(b.ErrMsg)
|
return errors.New(b.Ret.String())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user