【程序目录】优化小程序和公众号登录时候的错误抛出

This commit is contained in:
吴昊天 2022-12-16 16:53:56 +08:00
parent 28f71af94f
commit 60c2b28cba
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class MiniProgram extends BaseStorage implements OAuthInterface
$userInfoCong = MiniProgramService::getUserInfo($code);
$session_key = $userInfoCong['session_key'];
} catch (\Exception $e) {
throw new OAuthException(410076);
throw new OAuthException($e->getMessage());
}
if (!isset($userInfoCong['openid'])) {

View File

@ -59,7 +59,7 @@ class Wechat extends BaseStorage implements OAuthInterface
try {
$wechatInfo = WechatService::oauth2Service()->oauth();
} catch (\Throwable $e) {
throw new OAuthException(410131);
throw new OAuthException($e->getMessage());
}
} else {
/** @var WechatOpenService $service */