Skip to content

Commit

Permalink
Merge pull request #139 from mlavrk/save-original-exception
Browse files Browse the repository at this point in the history
Preserve reference to the original exception when casting to an RPC exception
  • Loading branch information
nanofelis authored Dec 14, 2023
2 parents 4f5e026 + ccdd7c3 commit 5d9bef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Request/RpcRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private function castToRpcException(\Throwable $e): AbstractRpcException
return $e;
}

$rpcException = new RpcApplicationException($e->getMessage(), $e->getCode());
$rpcException = new RpcApplicationException($e->getMessage(), $e->getCode(), $e);

if ($e instanceof RpcDataExceptionInterface) {
$rpcException->setData($e->getData());
Expand Down

0 comments on commit 5d9bef9

Please sign in to comment.