urbica / galton

Lightweight Node.js isochrone map server
https://galton.urbica.co
MIT License
271 stars 36 forks source link

Docker is dying for the request outside of the map #205

Open ramovsky opened 6 years ago

ramovsky commented 6 years ago

I've built a latest 5.17.2 version with the Berlin map following the Readme But any request outside of the Berlin will kill the docker with

/usr/local/share/.config/yarn/global/node_modules/isochrone/node_modules/@turf/helpers/index.js:213
            throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
            ^

Error: Each LinearRing of a Polygon must have 4 or more Positions.
    at Object.polygon (/usr/local/share/.config/yarn/global/node_modules/isochrone/node_modules/@turf/helpers/index.js:213:19)
    at makePolygon (/usr/local/share/.config/yarn/global/node_modules/isochrone/index.js:39:18)
    at Object.keys.reduce (/usr/local/share/.config/yarn/global/node_modules/isochrone/index.js:46:16)
    at Array.reduce (<anonymous>)
    at makePolygons (/usr/local/share/.config/yarn/global/node_modules/isochrone/index.js:43:33)
    at options.osrm.table (/usr/local/share/.config/yarn/global/node_modules/isochrone/index.js:104:26)

https://github.com/urbica/galton/blob/master/src/index.js#L37 And I was expecting 500 response (400 will more suite for that exact problem, but....)

stepankuzmin commented 6 years ago

Yep, this makes sense. Will fix that with next release. Thanks, @ramovsky!

mvaleev commented 5 years ago

Same error in v5.18.0.