From 8be88311d47dd5b9cb292a538610c545e2b94a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E4=B8=8D=E5=8F=AE=E5=92=9A?= Date: Wed, 24 Sep 2025 16:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=BF=83=E7=9A=84AP?= =?UTF-8?q?I=E8=B0=83=E7=94=A8=E5=92=8Crpc=E8=B0=83=E7=94=A8=E6=95=B4?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/autoload/exceptions.php | 9 ++++++--- config/autoload/middlewares.php | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/config/autoload/exceptions.php b/config/autoload/exceptions.php index 6fc068d..3e19273 100644 --- a/config/autoload/exceptions.php +++ b/config/autoload/exceptions.php @@ -9,16 +9,19 @@ declare(strict_types=1); * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + +use Aether\ApiExceptionHandler; +use Aether\RpcExceptionHandler; + return [ 'handler' => [ 'http' => [ Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class, - Aether\AppExceptionHandler::class, + ApiExceptionHandler::class, ], 'jsonrpc-http' => [ - //Aether\Exception\AppExceptionHandler::class, Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class, - Aether\AppExceptionHandler::class, + RpcExceptionHandler::class, ], ], ]; diff --git a/config/autoload/middlewares.php b/config/autoload/middlewares.php index 3c1dceb..a999228 100644 --- a/config/autoload/middlewares.php +++ b/config/autoload/middlewares.php @@ -1,10 +1,7 @@ [ - ApiExceptionHandler::class, ], 'jsonrpc-http' => [ RequestId::class, - RpcExceptionHandler::class, ], ];