# media-cloud-sync/1.2.7/includes/sdk/google/guzzlehttp/guzzle/src/Exception/BadResponseException.php

Media Cloud Sync, version 1.2.7. 32 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.2.7/code/includes/sdk/google/guzzlehttp/guzzle/src/Exception/BadResponseException.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.2.7/raw/includes/sdk/google/guzzlehttp/guzzle/src/Exception/BadResponseException.php
- Modified: 2024-10-27T10:40:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.2.7/code/includes/sdk/google/guzzlehttp/guzzle/src/Exception/BadResponseException.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\GuzzleHttp\Exception;

use Dudlewebs\WPMCS\Psr\Http\Message\RequestInterface;
use Dudlewebs\WPMCS\Psr\Http\Message\ResponseInterface;
/**
 * Exception when an HTTP error occurs (4xx or 5xx error)
 */
class BadResponseException extends RequestException
{
    public function __construct(string $message, RequestInterface $request, ResponseInterface $response, ?\Throwable $previous = null, array $handlerContext = [])
    {
        parent::__construct($message, $request, $response, $previous, $handlerContext);
    }
    /**
     * Current exception and the ones that extend it will always have a response.
     */
    public function hasResponse(): bool
    {
        return \true;
    }
    /**
     * This function narrows the return type from the parent class and does not allow it to be nullable.
     */
    public function getResponse(): ResponseInterface
    {
        /** @var ResponseInterface */
        return parent::getResponse();
    }
}

```
