histograph / api

Histograph API
https://api.histograph.io
MIT License
13 stars 4 forks source link

Problem / confusing error when calling API #51

Closed wires closed 9 years ago

wires commented 9 years ago

when requesting http://vps662.directvps.nl:3000/search?q=boskoop API fails and dies:

   ●───────●
  /║       ║\
 / ║       ║ \
●  ║═══════║  ●
 \ ║       ║ /
  \║       ║/
   ●───────●
Histograph API listening at port 3000
/home/histograph/api/lib/geojson.js:32
  if (json.length > 0) {
          ^
TypeError: Cannot read property 'length' of undefined
    at module.exports (/home/histograph/api/lib/geojson.js:32:11)
    at /home/histograph/api/index.js:44:26
    at /home/histograph/api/lib/query.js:36:11
    at Request._callback (/home/histograph/api/lib/graph.js:48:7)
    at Request.self.callback (/home/histograph/api/node_modules/request/request.js:197:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/home/histograph/api/node_modules/request/request.js:1050:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/home/histograph/api/node_modules/request/request.js:996:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)