Make TransportException in network disabled case clearer
Otherwise it's a bit hard to work out what request triggered the exceptionpull/8424/head
parent
aa6bc75af2
commit
7ef3a31de7
|
@ -229,7 +229,7 @@ class HttpDownloader
|
||||||
if (isset($job['request']['options']['http']['header']) && false !== stripos(implode('', $job['request']['options']['http']['header']), 'if-modified-since')) {
|
if (isset($job['request']['options']['http']['header']) && false !== stripos(implode('', $job['request']['options']['http']['header']), 'if-modified-since')) {
|
||||||
$resolve(new Response(array('url' => $url), 304, array(), ''));
|
$resolve(new Response(array('url' => $url), 304, array(), ''));
|
||||||
} else {
|
} else {
|
||||||
$e = new TransportException('Network disabled', 499);
|
$e = new TransportException('Network disabled, request canceled: '.$url, 499);
|
||||||
$e->setStatusCode(499);
|
$e->setStatusCode(499);
|
||||||
$reject($e);
|
$reject($e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue