From 4392f25e97a87e1ee0b5383d8139711fab9de098 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 21 Jun 2020 16:20:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BE=AE=E4=BF=A1=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/library/Errors.php | 2 ++ extend/catcher/library/WeChat.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extend/catcher/library/Errors.php b/extend/catcher/library/Errors.php index 4c752ed..82db53e 100644 --- a/extend/catcher/library/Errors.php +++ b/extend/catcher/library/Errors.php @@ -152,6 +152,8 @@ class Errors '45157' => '标签名非法,请注意不能和其他标签重名', '45158' => '标签名长度超过30个字节', '45056' => '创建的标签数过多,请注意不能超过100个', + '45058' => '不能修改0/1/2这三个系统默认保留的标签', + '45057' => '该标签下粉丝数超过10w,不允许直接删除', '9001001' => 'POST 数据参数不合法', '9001002' => '远端服务不可用', '9001003' => 'Ticket 不合法', diff --git a/extend/catcher/library/WeChat.php b/extend/catcher/library/WeChat.php index ad9cd06..2d8f446 100644 --- a/extend/catcher/library/WeChat.php +++ b/extend/catcher/library/WeChat.php @@ -66,7 +66,8 @@ class WeChat public static function throw($response) { if (isset($response['errcode']) && $response['errcode']) { - throw new WechatResponseException(Errors::WECHAT[$response['errcode']], $response['errcode']); + $message = Errors::WECHAT[$response['errcode']] ?? $response['errcode']; + throw new WechatResponseException($message, $response['errcode']); } return $response;