diff --git a/internal/data/wechatrepoimpl/cpn.go b/internal/data/wechatrepoimpl/cpn.go index a6d07cb..d323305 100644 --- a/internal/data/wechatrepoimpl/cpn.go +++ b/internal/data/wechatrepoimpl/cpn.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/go-kratos/kratos/v2/log" "github.com/wechatpay-apiv3/wechatpay-go/core" "github.com/wechatpay-apiv3/wechatpay-go/services/cashcoupons" "io" @@ -54,6 +55,7 @@ func (c *CpnRepoImpl) bodyErr(_ context.Context, result *core.APIResult) error { var errBody ErrBody if err = json.Unmarshal(bodyBytes, &errBody); err != nil { + log.Errorf("微信错误返回body解析报错,body:%s,err:%s", string(bodyBytes), err.Error()) return err2.ErrorWechatFAIL(fmt.Sprintf("微信错误返回内容解析错误:%s", err.Error())) }