改名
This commit is contained in:
+3
-1
@@ -13,6 +13,8 @@ use Exception;
|
|||||||
use Http\Message\Response;
|
use Http\Message\Response;
|
||||||
use Http\Message\Stream;
|
use Http\Message\Stream;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
|
use Kiri\Abstracts\Logger;
|
||||||
|
use Kiri\Kiri;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Swoole\Coroutine\Http\Client as SwowClient;
|
use Swoole\Coroutine\Http\Client as SwowClient;
|
||||||
|
|
||||||
@@ -57,7 +59,7 @@ class Client extends ClientAbstracts
|
|||||||
->withHeaders($client->getHeaders())
|
->withHeaders($client->getHeaders())
|
||||||
->withBody(new Stream($client->getBody()));
|
->withBody(new Stream($client->getBody()));
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception, 'rpc');
|
Kiri::getDi()->get(Logger::class)->error('rpc', [$exception]);
|
||||||
return (new Response())->withStatus(-1)->withHeaders([])
|
return (new Response())->withStatus(-1)->withHeaders([])
|
||||||
->withBody(new Stream(jTraceEx($exception)));
|
->withBody(new Stream(jTraceEx($exception)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user