优化微信错误码
This commit is contained in:
parent
73c7788218
commit
4392f25e97
@ -152,6 +152,8 @@ class Errors
|
||||
'45157' => '标签名非法,请注意不能和其他标签重名',
|
||||
'45158' => '标签名长度超过30个字节',
|
||||
'45056' => '创建的标签数过多,请注意不能超过100个',
|
||||
'45058' => '不能修改0/1/2这三个系统默认保留的标签',
|
||||
'45057' => '该标签下粉丝数超过10w,不允许直接删除',
|
||||
'9001001' => 'POST 数据参数不合法',
|
||||
'9001002' => '远端服务不可用',
|
||||
'9001003' => 'Ticket 不合法',
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user