basho / riak-nodejs-client

The Riak client for Node.js.
Apache License 2.0
72 stars 28 forks source link

uncaught exception #163

Closed faust64 closed 8 years ago

faust64 commented 8 years ago

My logs show several occurrences of the following error:

node-app[XXX]: error: UNCAUGHT EXCEPTION TypeError: Cannot read property 'name' of undefined#012    at RiakNode._connectionClosed (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riaknode.js:565:27)#012    at emitTwo (events.js:106:13)#012    at RiakConnection.emit (events.js:191:7)#012    at RiakConnection._emitAndClose (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riakconnection.js:137:18)#012    at RiakConnection._connHandleEnd (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riakconnection.js:144:14)#012    at emitNone (events.js:91:20)#012    at Socket.emit (events.js:185:7)#012    at endReadableNT (_stream_readable.js:934:12)#012    at _combinedTickCallback (internal/process/next_tick.js:74:11)#012    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

I assume, from the comment a couple lines above, that command / command.name may be undefined, which may cause these uncaught exceptions.

Let me know if you need an issue or anything.

lukebakken commented 8 years ago

Cleaned up stack trace:

node-app[XXX]: error: UNCAUGHT EXCEPTION TypeError: Cannot read property 'name' of undefined#012
at RiakNode._connectionClosed (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riaknode.js:565:27)#012
at emitTwo (events.js:106:13)#012
at RiakConnection.emit (events.js:191:7)#012
at RiakConnection._emitAndClose (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riakconnection.js:137:18)#012
at RiakConnection._connHandleEnd (/usr/share/XXX/Staging-d-O79Y6AIIG/node_modules/basho-riak-client/lib/core/riakconnection.js:144:14)#012
at emitNone (events.js:91:20)#012
at Socket.emit (events.js:185:7)#012
at endReadableNT (_stream_readable.js:934:12)#012
at _combinedTickCallback (internal/process/next_tick.js:74:11)#012
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
lukebakken commented 8 years ago

Thank you, I have added your commit to PR #164