数据中心的API调用和rpc调用整合

This commit is contained in:
阿不叮咚
2025-09-24 16:48:02 +08:00
parent 1f6b60ee0f
commit 8be88311d4
2 changed files with 6 additions and 8 deletions

View File

@@ -9,16 +9,19 @@ declare(strict_types=1);
* @contact group@hyperf.io * @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/ */
use Aether\ApiExceptionHandler;
use Aether\RpcExceptionHandler;
return [ return [
'handler' => [ 'handler' => [
'http' => [ 'http' => [
Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class, Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
Aether\AppExceptionHandler::class, ApiExceptionHandler::class,
], ],
'jsonrpc-http' => [ 'jsonrpc-http' => [
//Aether\Exception\AppExceptionHandler::class,
Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class, Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
Aether\AppExceptionHandler::class, RpcExceptionHandler::class,
], ],
], ],
]; ];

View File

@@ -1,10 +1,7 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
use Aether\ApiExceptionHandler;
use Aether\Middleware\RequestId; use Aether\Middleware\RequestId;
use Aether\RpcExceptionHandler;
/* /*
* This file is part of Hyperf. * This file is part of Hyperf.
@@ -17,10 +14,8 @@ use Aether\RpcExceptionHandler;
return [ return [
'http' => [ 'http' => [
ApiExceptionHandler::class,
], ],
'jsonrpc-http' => [ 'jsonrpc-http' => [
RequestId::class, RequestId::class,
RpcExceptionHandler::class,
], ],
]; ];