ForestAdmin / forest-express

🧱 Dependency of Express Lianas for Forest Admin
GNU General Public License v3.0
72 stars 21 forks source link

Small crash in forest-server-requester #261

Closed Caerbannog closed 4 years ago

Caerbannog commented 5 years ago

Description

Our forest api usually works great. One time, there was a request that caused a crash in forest-express. I don't know why this request was special, all I have is the following stack trace.

Failure Logs

/tmp/node_modules/forest-express/dist/services/forest-server-requester.js:25
if (result.status === 200 && result.body) {
^
TypeError: Cannot read property 'status' of undefined
at /tmp/node_modules/forest-express/dist/services/forest-server-requester.js:25:18
at Request.callback (/tmp/node_modules/superagent/lib/node/index.js:704:3)
at ClientRequest.<anonymous> (/tmp/node_modules/superagent/lib/node/index.js:637:10)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at ClientRequest.EventEmitter.emit (domain.js:448:20)
at TLSSocket.socketOnEnd (_http_client.js:426:9)
at TLSSocket.emit (events.js:203:15)
at TLSSocket.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1129:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forest-admin-api@0.0.1 start: `lumber update && node ./bin/www.js`
npm ERR! Exit status 1

Context

arnaudbesnier commented 4 years ago

Hi @Caerbannog,

Thanks for the feedback!

This crash issue has been fixed with this patch: https://github.com/ForestAdmin/forest-express/commit/f4bf498e0105ab80837e5b6e106b59bf080f2d8e

By upgrading to forest-express-sequelize@5.1.0, you should not observe this kind of crash anymore.

Feel free to re-open the ticket if the issue persists.

🌲🌲🌲