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, ], ];