Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

getInfo error not properly handled #133

Open
springmeyer opened this issue Jun 29, 2015 · 0 comments
Open

getInfo error not properly handled #133

springmeyer opened this issue Jun 29, 2015 · 0 comments

Comments

@springmeyer
Copy link
Contributor

It appears that a failure in tilelive-bridge getInfo is not properly handled by tilelive.js.

You would think that https://github.com/mapbox/tilelive-bridge/blob/ae67f59b3e8e094c7b6a07597a76dbb073becd1f/index.js#L227 would trickle up and be handled cleanly but somehow instead an undefined ts is passed to https://github.com/mapbox/tilelive.js/blob/master/lib/tilelive.js#L293 causing an exception to be throw rather than an error returned. If this is expected behavior then perhaps we need a try/catch around validate?

Here is the exception seen:

      [Error: OGR Plugin: connection failed: /home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/node_modules/mapnik-test-data/data/kml/1week_earthquake.kml was not found or is not a supported format  encountered during parsing of layer 'Magnitude 6' in Layer]
    at: Bridge.<anonymous> (/home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-bridge/index.js:227:25)
    stack:
      Error: OGR Plugin: connection failed: /home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/node_modules/mapnik-test-data/data/kml/1week_earthquake.kml was not found or is not a supported format  encountered during parsing of layer 'Magnitude 6' in Layer
  ...
/home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/node_modules/tilelive/lib/tilelive.js:275
    if ((typeof info.minzoom === 'number') && (typeof info.maxzoom === 'number
                    ^
TypeError: Cannot read property 'minzoom' of undefined
    at Object.tilelive.validate (/home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/node_modules/tilelive/lib/tilelive.js:275:21)
    at Object.tilelive.verify (/home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/node_modules/tilelive/lib/tilelive.js:293:24)
    at /home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-omnivore/test/index.js:54:26
    at Bridge.<anonymous> (/home/travis/build/mapbox/mapnik-swoop/node_modules/tilelive-bridge/index.js:227:25)
    at /home/travis/build/mapbox/mapnik-swoop/node_modules/generic-pool/lib/generic-pool.js:274:11
    at loaded (/home/travis/build/mapbox/mapnik-swoop/node_modules/mapnik-pool/index.js:23:37)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant