Skip to content

Commit

Permalink
Revert "save original response in EXC_TYPE_RET_CODE type exception"
Browse files Browse the repository at this point in the history
This reverts commit b11a93f.
  • Loading branch information
wangrzneu committed Dec 14, 2023
1 parent b11a93f commit 1e0936d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
22 changes: 1 addition & 21 deletions src/Core/Exception/UCloudException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

use Exception;
use Throwable;
use UCloud\Core\Response\Response;


class UCloudException extends Exception
{
Expand All @@ -32,12 +30,6 @@ class UCloudException extends Exception
*/
private $requestId;

/**
* Original Response
*
* @var Response
*/
private $response;
/**
* UCloudException constructor.
*
Expand All @@ -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);
}

Expand All @@ -75,14 +65,4 @@ public function getRequestId()
{
return $this->requestId;
}

/**
* Get response
*
* @return Response
*/
public function getResponse()
{
return $this->response;
}
}
3 changes: 1 addition & 2 deletions src/Core/Transport/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public function invoke(Request $req)
$resp->getMessage(),
$resp->getRetCode(),
null,
$requestId,
$resp
$requestId
);
}
return $resp;
Expand Down

0 comments on commit 1e0936d

Please sign in to comment.