diff --git a/hdl/jg_push.go b/hdl/jg_push.go index 510a805..ca025a6 100644 --- a/hdl/jg_push.go +++ b/hdl/jg_push.go @@ -62,6 +62,11 @@ func Send(appKey, appSecret string, param md.PushParam) (string, string, error) return "", "", err } fmt.Println(string(res)) + code := gjson.Get(string(res), "error.code").Int() + if code > 0 { + message := gjson.Get(string(res), "error.message").String() + return "", string(res), errors.New(message) + } msgId := gjson.Get(string(res), "msg_id").String() if msgId == "0" || msgId == "" { return "", string(res), err