Merge pull request #7 from bradjones1/more-context-in-http-exception

Add more original context to HTTP exception
This commit is contained in:
Brad Jones 2021-06-24 11:07:20 -06:00 committed by GitHub
commit e1566bd876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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