# decalog/4.4.0/includes/libraries/http/client/Exception/RequestException.php

DecaLog, version 4.4.0. 30 lines.

- Page: https://pluginprobe.com/plugins/decalog/4.4.0/code/includes/libraries/http/client/Exception/RequestException.php
- Raw: https://pluginprobe.com/plugins/decalog/4.4.0/raw/includes/libraries/http/client/Exception/RequestException.php
- Modified: 2024-05-13T07:42:54+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/decalog/4.4.0/code/includes/libraries/http/client/Exception/RequestException.php#L10-L20`.

```php
<?php

namespace Http\Client\Exception;

use Psr\Http\Client\RequestExceptionInterface as PsrRequestException;
use Psr\Http\Message\RequestInterface;

/**
 * Exception for when a request failed, providing access to the failed request.
 *
 * This could be due to an invalid request, or one of the extending exceptions
 * for network errors or HTTP error responses.
 *
 * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
 */
class RequestException extends TransferException implements PsrRequestException
{
    use RequestAwareTrait;

    /**
     * @param string $message
     */
    public function __construct($message, RequestInterface $request, \Exception $previous = null)
    {
        $this->setRequest($request);

        parent::__construct($message, 0, $previous);
    }
}

```
