mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:42:53 +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 GuzzleHttp\RequestOptions;
|
||||||
use mattwright\URLResolver;
|
use mattwright\URLResolver;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use Psr\Log\InvalidArgumentException;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,6 +147,9 @@ class HTTPClient implements IHTTPClient
|
||||||
} else {
|
} else {
|
||||||
return new CurlResult($url, '', ['http_code' => $exception->getCode()], $exception->getCode(), '');
|
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 {
|
} finally {
|
||||||
$this->logger->debug('Request stop.', ['url' => $url, 'method' => $method]);
|
$this->logger->debug('Request stop.', ['url' => $url, 'method' => $method]);
|
||||||
$this->profiler->stopRecording();
|
$this->profiler->stopRecording();
|
||||||
|
|
Loading…
Reference in a new issue