WordPress\AiClient\Providers\Http\Exception

ClientException::getRequestpublicWP 0.2.0

Returns the request that failed as our Request DTO.

Method of the class: ClientException{}

No Hooks.

Returns

Request.

Usage

$ClientException = new ClientException();
$ClientException->getRequest(): Request;

Changelog

Since 0.2.0 Introduced.

ClientException::getRequest() code WP 7.0

public function getRequest(): Request
{
    if ($this->request === null) {
        throw new \RuntimeException('Request object not available. This exception was directly instantiated. ' . 'Use a factory method that provides request context.');
    }
    return $this->request;
}