1
0
Fork 0

Make TransportException in network disabled case clearer

Otherwise it's a bit hard to work out what request triggered the exception
pull/8424/head
Nils Adermann 2019-11-12 22:00:02 +01:00
parent aa6bc75af2
commit 7ef3a31de7
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }