You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same spot as above, we need graceful failure if the airtable response doesn't come back properly.
2018-08-20T07:39:33.505685443Z app[web.1]: /app/routes/projects.js:14
2018-08-20T07:39:33.505735784Z app[web.1]: let newArray = body.records.map(obj => obj.fields);
2018-08-20T07:39:33.505741827Z app[web.1]: ^
2018-08-20T07:39:33.505746689Z app[web.1]:
2018-08-20T07:39:33.505751134Z app[web.1]: TypeError: Cannot read property 'map' of undefined
2018-08-20T07:39:33.505755699Z app[web.1]: at Request.request [as _callback] (/app/routes/projects.js:14:35)
2018-08-20T07:39:33.505760484Z app[web.1]: at Request.self.callback (/app/node_modules/request/request.js:185:22)
2018-08-20T07:39:33.505765189Z app[web.1]: at emitTwo (events.js:126:13)
2018-08-20T07:39:33.505769669Z app[web.1]: at Request.emit (events.js:214:7)
2018-08-20T07:39:33.505774129Z app[web.1]: at Request. (/app/node_modules/request/request.js:1157:10)
2018-08-20T07:39:33.505778964Z app[web.1]: at emitOne (events.js:116:13)
2018-08-20T07:39:33.505783429Z app[web.1]: at Request.emit (events.js:211:7)
2018-08-20T07:39:33.505787881Z app[web.1]: at IncomingMessage. (/app/node_modules/request/request.js:1079:12)
2018-08-20T07:39:33.505792669Z app[web.1]: at Object.onceWrapper (events.js:313:30)
2018-08-20T07:39:33.505797074Z app[web.1]: at emitNone (events.js:111:20)
2018-08-20T07:39:33.525559928Z app[web.1]:
2018-08-20T07:39:33.534143160Z app[web.1]: npm ERR! Linux 4.4.0-130-generic
2018-08-20T07:39:33.534453056Z app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2018-08-20T07:39:33.534769536Z app[web.1]: npm ERR! node v8.11.3
2018-08-20T07:39:33.534972013Z app[web.1]: npm ERR! npm v4.0.5
2018-08-20T07:39:33.535215854Z app[web.1]: npm ERR! code ELIFECYCLE
2018-08-20T07:39:33.535442831Z app[web.1]: npm ERR! capital-planning-api@0.0.1 start: node ./bin/www
2018-08-20T07:39:33.535662690Z app[web.1]: npm ERR! Exit status 1
2018-08-20T07:39:33.535785653Z app[web.1]: npm ERR!
2018-08-20T07:39:33.536020106Z app[web.1]: npm ERR! Failed at the capital-planning-api@0.0.1 start script 'node ./bin/www'.
2018-08-20T07:39:33.536127969Z app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2018-08-20T07:39:33.536391459Z app[web.1]: npm ERR! If you do, this is most likely a problem with the capital-planning-api package,
2018-08-20T07:39:33.536505339Z app[web.1]: npm ERR! not with npm itself.
2018-08-20T07:39:33.536733352Z app[web.1]: npm ERR! Tell the author that this fails on your system:
2018-08-20T07:39:33.536840801Z app[web.1]: npm ERR! node ./bin/www
2018-08-20T07:39:33.537068595Z app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2018-08-20T07:39:33.537179969Z app[web.1]: npm ERR! npm bugs capital-planning-api
2018-08-20T07:39:33.537407433Z app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2018-08-20T07:39:33.537514892Z app[web.1]: npm ERR! npm owner ls capital-planning-api
2018-08-20T07:39:33.537734938Z app[web.1]: npm ERR! There is likely additional logging output above.
2018-08-20T07:39:33.541683890Z app[web.1]:
2018-08-20T07:39:33.541905089Z app[web.1]: npm ERR! Please include the following file with any support request:
2018-08-20T07:39:33.541996216Z app[web.1]: npm ERR! /app/npm-debug.log
@allthesignals commented on Tue May 29 2018
API goes down frequently, making it impossibl for users to navigate to our many projects apps.
@chriswhong commented on Mon Aug 20 2018
Looks like we need to add a check for
err
here: https://github.com/NYCPlanning/labs-api/blob/master/routes/projects.js#L14@chriswhong commented on Mon Aug 20 2018
Same spot as above, we need graceful failure if the airtable response doesn't come back properly.
2018-08-20T07:39:33.505685443Z app[web.1]: /app/routes/projects.js:14
2018-08-20T07:39:33.505735784Z app[web.1]: let newArray = body.records.map(obj => obj.fields);
2018-08-20T07:39:33.505741827Z app[web.1]: ^
2018-08-20T07:39:33.505746689Z app[web.1]:
2018-08-20T07:39:33.505751134Z app[web.1]: TypeError: Cannot read property 'map' of undefined
2018-08-20T07:39:33.505755699Z app[web.1]: at Request.request [as _callback] (/app/routes/projects.js:14:35)
2018-08-20T07:39:33.505760484Z app[web.1]: at Request.self.callback (/app/node_modules/request/request.js:185:22)
2018-08-20T07:39:33.505765189Z app[web.1]: at emitTwo (events.js:126:13)
2018-08-20T07:39:33.505769669Z app[web.1]: at Request.emit (events.js:214:7)
2018-08-20T07:39:33.505774129Z app[web.1]: at Request. (/app/node_modules/request/request.js:1157:10)
2018-08-20T07:39:33.505778964Z app[web.1]: at emitOne (events.js:116:13)
2018-08-20T07:39:33.505783429Z app[web.1]: at Request.emit (events.js:211:7)
2018-08-20T07:39:33.505787881Z app[web.1]: at IncomingMessage. (/app/node_modules/request/request.js:1079:12)
2018-08-20T07:39:33.505792669Z app[web.1]: at Object.onceWrapper (events.js:313:30)
2018-08-20T07:39:33.505797074Z app[web.1]: at emitNone (events.js:111:20)
2018-08-20T07:39:33.525559928Z app[web.1]:
2018-08-20T07:39:33.534143160Z app[web.1]: npm ERR! Linux 4.4.0-130-generic
2018-08-20T07:39:33.534453056Z app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2018-08-20T07:39:33.534769536Z app[web.1]: npm ERR! node v8.11.3
2018-08-20T07:39:33.534972013Z app[web.1]: npm ERR! npm v4.0.5
2018-08-20T07:39:33.535215854Z app[web.1]: npm ERR! code ELIFECYCLE
2018-08-20T07:39:33.535442831Z app[web.1]: npm ERR! capital-planning-api@0.0.1 start:
node ./bin/www
2018-08-20T07:39:33.535662690Z app[web.1]: npm ERR! Exit status 1
2018-08-20T07:39:33.535785653Z app[web.1]: npm ERR!
2018-08-20T07:39:33.536020106Z app[web.1]: npm ERR! Failed at the capital-planning-api@0.0.1 start script 'node ./bin/www'.
2018-08-20T07:39:33.536127969Z app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2018-08-20T07:39:33.536391459Z app[web.1]: npm ERR! If you do, this is most likely a problem with the capital-planning-api package,
2018-08-20T07:39:33.536505339Z app[web.1]: npm ERR! not with npm itself.
2018-08-20T07:39:33.536733352Z app[web.1]: npm ERR! Tell the author that this fails on your system:
2018-08-20T07:39:33.536840801Z app[web.1]: npm ERR! node ./bin/www
2018-08-20T07:39:33.537068595Z app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2018-08-20T07:39:33.537179969Z app[web.1]: npm ERR! npm bugs capital-planning-api
2018-08-20T07:39:33.537407433Z app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2018-08-20T07:39:33.537514892Z app[web.1]: npm ERR! npm owner ls capital-planning-api
2018-08-20T07:39:33.537734938Z app[web.1]: npm ERR! There is likely additional logging output above.
2018-08-20T07:39:33.541683890Z app[web.1]:
2018-08-20T07:39:33.541905089Z app[web.1]: npm ERR! Please include the following file with any support request:
2018-08-20T07:39:33.541996216Z app[web.1]: npm ERR! /app/npm-debug.log
@chriswhong commented on Wed Jan 09 2019
2019-01-08T23:04:13.759020307Z app[web.1]: /app/routes/projects.js:14
2019-01-08T23:04:13.759058560Z app[web.1]: let newArray = body.records.map(obj => obj.fields);
2019-01-08T23:04:13.759065103Z app[web.1]: ^
2019-01-08T23:04:13.759069885Z app[web.1]:
2019-01-08T23:04:13.759074407Z app[web.1]: TypeError: Cannot read property 'map' of undefined
2019-01-08T23:04:13.759078940Z app[web.1]: at Request.request [as _callback] (/app/routes/projects.js:14:35)
2019-01-08T23:04:13.759083506Z app[web.1]: at Request.self.callback (/app/node_modules/request/request.js:185:22)
2019-01-08T23:04:13.759088245Z app[web.1]: at emitTwo (events.js:126:13)
2019-01-08T23:04:13.759092736Z app[web.1]: at Request.emit (events.js:214:7)
2019-01-08T23:04:13.759097271Z app[web.1]: at Request. (/app/node_modules/request/request.js:1161:10)
2019-01-08T23:04:13.759102047Z app[web.1]: at emitOne (events.js:116:13)
2019-01-08T23:04:13.759108079Z app[web.1]: at Request.emit (events.js:211:7)
2019-01-08T23:04:13.759112661Z app[web.1]: at IncomingMessage. (/app/node_modules/request/request.js:1083:12)
2019-01-08T23:04:13.759117578Z app[web.1]: at Object.onceWrapper (events.js:313:30)
2019-01-08T23:04:13.759122037Z app[web.1]: at emitNone (events.js:111:20)
2019-01-08T23:04:13.785586205Z app[web.1]:
@allthesignals commented on Thu Jan 02 2020
Still seeing this, sometimes Airtable responds with non-error and in an unexpected shape. This causes the app to fail...:
https://github.com/NYCPlanning/labs-home-api/blob/develop/routes/projects.js#L12
We need to make sure that body.records is available first
@allthesignals commented on Thu Jan 30 2020
This is still happening, same error. Woops!
The text was updated successfully, but these errors were encountered: