From 1e0936dff0b3715e03105ea8a7bbb07c6068a733 Mon Sep 17 00:00:00 2001 From: "renzheng.wang" Date: Thu, 14 Dec 2023 13:48:21 +0800 Subject: [PATCH] Revert "save original response in EXC_TYPE_RET_CODE type exception" This reverts commit b11a93fcc35ada02ccc36b2857c2d5582b0ed756. --- src/Core/Exception/UCloudException.php | 22 +--------------------- src/Core/Transport/Transport.php | 3 +-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/Core/Exception/UCloudException.php b/src/Core/Exception/UCloudException.php index 26551595..84336e3d 100644 --- a/src/Core/Exception/UCloudException.php +++ b/src/Core/Exception/UCloudException.php @@ -5,8 +5,6 @@ use Exception; use Throwable; -use UCloud\Core\Response\Response; - class UCloudException extends Exception { @@ -32,12 +30,6 @@ class UCloudException extends Exception */ private $requestId; - /** - * Original Response - * - * @var Response - */ - private $response; /** * UCloudException constructor. * @@ -46,13 +38,11 @@ class UCloudException extends Exception * @param int|int $retCode * @param Throwable|null $previous * @param string $requestId - * @param Response $response */ - public function __construct($type, $message = "", $retCode = 0, $previous = null, $requestId = "", $response = null) + public function __construct($type, $message = "", $retCode = 0, $previous = null, $requestId = "") { $this->type = $type; $this->requestId = $requestId; - $this->response = $response; parent::__construct($message, $retCode, $previous); } @@ -75,14 +65,4 @@ public function getRequestId() { return $this->requestId; } - - /** - * Get response - * - * @return Response - */ - public function getResponse() - { - return $this->response; - } } diff --git a/src/Core/Transport/Transport.php b/src/Core/Transport/Transport.php index 8d096f34..3215cdf1 100644 --- a/src/Core/Transport/Transport.php +++ b/src/Core/Transport/Transport.php @@ -87,8 +87,7 @@ public function invoke(Request $req) $resp->getMessage(), $resp->getRetCode(), null, - $requestId, - $resp + $requestId ); } return $resp;