mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
This commit is contained in:
parent
3eb2abdb2a
commit
10e6089405
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,7 @@ use GuzzleHttp\Exception\TransferException;
|
|||
use GuzzleHttp\RequestOptions;
|
||||
use mattwright\URLResolver;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Log\InvalidArgumentException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
|
@ -146,6 +147,9 @@ class HTTPClient implements IHTTPClient
|
|||
} else {
|
||||
return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), '');
|
||||
}
|
||||
} catch (InvalidArgumentException $argumentException) {
|
||||
$this->logger->info('Invalid Argument for HTTP call.', ['url' => $url, 'method' => $method, 'exception' => $argumentException]);
|
||||
return new CurlResult($url, '', ['http_code' => $argumentException->getCode()], $argumentException->getCode(), $argumentException->getMessage());
|
||||
} finally {
|
||||
$this->logger->debug('Request stop.', ['url' => $url, 'method' => $method]);
|
||||
$this->profiler->stopRecording();
|
||||
|
|
Loading…
Reference in a new issue