From 9b8591d1f348d1fa3700e755aa7ed4c836be2c40 Mon Sep 17 00:00:00 2001 From: Brad Jones Date: Wed, 2 Jun 2021 16:45:36 -1000 Subject: [PATCH] Add more original context to HTTP exception --- src/Exceptions/MatrixHttpLibException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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