Don't handle response errors separately in osrm-runner

This commit is contained in:
Michael Krasnyk 2018-04-24 09:23:25 +02:00
parent 5be284ecf7
commit 4773dd768a
No known key found for this signature in database
GPG Key ID: 49C12AD0F43D2108

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) {