Add more original context to HTTP exception

This commit is contained in:
Brad Jones 2021-06-02 16:45:36 -10:00 committed by Aryess
parent 38c79f2d04
commit 9b8591d1f3

View file

@ -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);
}
}