From 0c17eebc597fd630d854e9aeb410ed2bf58e4fef Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Fri, 9 Jun 2023 12:27:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BD=BF=E7=94=A8=E7=BB=88?= =?UTF-8?q?=E6=AD=A2=E5=87=BD=E6=95=B0=E6=89=93=E5=8D=B0=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/AdminApiExceptionHandle.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crmeb/app/adminapi/AdminApiExceptionHandle.php b/crmeb/app/adminapi/AdminApiExceptionHandle.php index ae53ce948..eb8eeaa03 100644 --- a/crmeb/app/adminapi/AdminApiExceptionHandle.php +++ b/crmeb/app/adminapi/AdminApiExceptionHandle.php @@ -17,6 +17,7 @@ use crmeb\exceptions\ApiException; use crmeb\exceptions\AuthException; use think\db\exception\DbException; use think\exception\Handle; +use think\exception\HttpResponseException; use think\exception\ValidateException; use think\facade\Env; use think\facade\Log; @@ -81,6 +82,9 @@ class AdminApiExceptionHandle extends Handle */ public function render($request, Throwable $e): Response { + if ($e instanceof HttpResponseException) { + return parent::render($request, $e); + } $massageData = Env::get('app_debug', false) ? [ 'message' => $e->getMessage(), 'file' => $e->getFile(),