Skip to content

Commit

Permalink
fix: log url in case of curl error (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored Oct 4, 2022
1 parent 327b0c0 commit 7cfacb0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,18 @@ protected function commitSession() {

/**
* @codeCoverageIgnore
* @throws OpenIDConnectClientException
*/
protected function fetchURL($url, $post_body = null, $headers = []) {
// TODO: see how to use ownCloud HttpClient ....
return parent::fetchURL($url, $post_body, $headers);
try {
return parent::fetchURL($url, $post_body, $headers);
} catch (\Exception $ex) {
$exception = \get_class($ex);
$msg = $ex->getMessage();
$this->logger->error("$exception accessing $url: $msg");
throw $ex;
}
}

/**
Expand Down

0 comments on commit 7cfacb0

Please sign in to comment.