Don't handle response errors separately in osrm-runner

This commit is contained in:
Michael Krasnyk 2018-04-24 09:23:25 +02:00 committed by Patrick Niklaus
parent 9695fa7941
commit 105709cb43

View File

@ -16,8 +16,6 @@ const run_query = (query_options, filters, callback) => {
let tic = () => 0.; let tic = () => 0.;
http.request(query_options, function (res) { http.request(query_options, function (res) {
let body = '', ttfb = tic(); let body = '', ttfb = tic();
if (res.statusCode != 200)
return callback(query_options.path, res.statusCode, ttfb);
res.setEncoding('utf8'); res.setEncoding('utf8');
res.on('data', function (chunk) { res.on('data', function (chunk) {