铁匠铺交易屏蔽错误码

This commit is contained in:
wh_zcy 2023-06-29 18:03:52 +08:00
parent d1ffca6153
commit 4c2d96512e

View File

@ -31,20 +31,15 @@ func (this *apiComp) Sell(session comm.IUserSession, req *pb.SmithySellReq) (err
if err != nil {
var customErr = new(comm.CustomError)
if errors.As(err, &customErr) {
errdata = &pb.ErrorData{
Code: customErr.Code,
Title: customErr.Code.ToString(),
Message: err.Error(),
}
this.module.Debug(customErr.Code.String())
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
return
}
conf, err := this.module.configure.GetSmithyCustomerConf(req.CustomerId)