WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

YoastSEO_Vendor\GuzzleHttp\Exception

RequestException::create() public Yoast 1.0

Factory method to create a new exception with a normalized error message

{} Это метод класса: RequestException{}

Хуков нет.

Возвращает

self.

Использование

$result = RequestException::create( \YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface $response, \Exception $previous, $ctx );
$request(Requestчислоerface) (обязательный)
Request
$response(Responseчислоerface) (обязательный)
Response received
$previous(\Exception) (обязательный)
Previous exception
$ctx(массив)
Optional handler context.
По умолчанию: []

Код RequestException::create() Yoast 15.7

<?php
public static function create(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface $response = null, \Exception $previous = null, array $ctx = [])
{
    if (!$response) {
        return new self('Error completing request', $request, null, $previous, $ctx);
    }
    $level = (int) \floor($response->getStatusCode() / 100);
    if ($level === 4) {
        $label = 'Client error';
        $className = \YoastSEO_Vendor\GuzzleHttp\Exception\ClientException::class;
    } elseif ($level === 5) {
        $label = 'Server error';
        $className = \YoastSEO_Vendor\GuzzleHttp\Exception\ServerException::class;
    } else {
        $label = 'Unsuccessful request';
        $className = __CLASS__;
    }
    $uri = $request->getUri();
    $uri = static::obfuscateUri($uri);
    // Client Error: `GET /` resulted in a `404 Not Found` response:
    // <html> ... (truncated)
    $message = \sprintf('%s: `%s %s` resulted in a `%s %s` response', $label, $request->getMethod(), $uri, $response->getStatusCode(), $response->getReasonPhrase());
    $summary = static::getResponseBodySummary($response);
    if ($summary !== null) {
        $message .= ":\n{$summary}\n";
    }
    return new $className($message, $request, $response, $previous, $ctx);
}