diff --git a/src/Exceptions/MatrixHttpLibException.php b/src/Exceptions/MatrixHttpLibException.php index ff27c47..c64c365 100644 --- a/src/Exceptions/MatrixHttpLibException.php +++ b/src/Exceptions/MatrixHttpLibException.php @@ -12,6 +12,6 @@ class MatrixHttpLibException extends MatrixException { public function __construct(\Exception $originalException, string $method, string $endpoint) { $msg = "Something went wrong in %s requesting %s: %s"; $msg = sprintf($msg, $method, $endpoint, $originalException); - parent::__construct($msg); + parent::__construct($msg, $originalException->getCode(), $originalException); } } \ No newline at end of file