static $connectionErrors =
[ \CURLE_OPERATION_TIMEOUTED => true,
\CURLE_COULDNT_RESOLVE_HOST => true,
\CURLE_COULDNT_CONNECT => true,
\CURLE_SSL_CONNECT_ERROR => true,
\CURLE_GOT_NOTHING => true,
];
if ($easy->createResponseException
) { return P\Create::
rejectionFor( new RequestException( 'An error was encountered while creating the response',
$easy->request,
$easy->response,
$easy->createResponseException,
$ctx ) );
} // If an exception was encountered during the onHeaders event, then
// return a rejected promise that wraps that exception.