PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / trunk
ShareThis Dashboard for Google Analytics vtrunk
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / guzzlehttp / guzzle / src / Exception / BadResponseException.php
googleanalytics / lib / analytics-admin / vendor / guzzlehttp / guzzle / src / Exception Last commit date
BadResponseException.php 3 years ago ClientException.php 3 years ago ConnectException.php 3 years ago GuzzleException.php 3 years ago InvalidArgumentException.php 3 years ago RequestException.php 3 years ago ServerException.php 3 years ago TooManyRedirectsException.php 3 years ago TransferException.php 3 years ago
BadResponseException.php
40 lines
1 <?php
2
3 namespace GuzzleHttp\Exception;
4
5 use Psr\Http\Message\RequestInterface;
6 use Psr\Http\Message\ResponseInterface;
7
8 /**
9 * Exception when an HTTP error occurs (4xx or 5xx error)
10 */
11 class BadResponseException extends RequestException
12 {
13 public function __construct(
14 string $message,
15 RequestInterface $request,
16 ResponseInterface $response,
17 \Throwable $previous = null,
18 array $handlerContext = []
19 ) {
20 parent::__construct($message, $request, $response, $previous, $handlerContext);
21 }
22
23 /**
24 * Current exception and the ones that extend it will always have a response.
25 */
26 public function hasResponse(): bool
27 {
28 return true;
29 }
30
31 /**
32 * This function narrows the return type from the parent class and does not allow it to be nullable.
33 */
34 public function getResponse(): ResponseInterface
35 {
36 /** @var ResponseInterface */
37 return parent::getResponse();
38 }
39 }
40