tonistiigi / mega

THIS REPO IS NOT MAINTAINED. Unofficial Node.js SDK for Mega
http://tonistiigi.github.com/mega
118 stars 33 forks source link

Length of undefined in api.js #10

Closed anolek closed 11 years ago

anolek commented 11 years ago

Hi,

I got this error, sometimes.

Message: Cannot read property 'length' of undefined

Stacktrace - TypeError: Cannot read property 'length' of undefined at Request._callback (~/node_modules/mega/lib/api.js:56:13) at Request.self.callback (~/node_modules/request/index.js:148:22) at Request.EventEmitter.emit (events.js:98:17) at Request. (~/node_modules/request/index.js:876:14) at Request.EventEmitter.emit (events.js:117:20) at IncomingMessage. (~/node_modules/request/index.js:827:12) at IncomingMessage.EventEmitter.emit (events.js:117:20) at _stream_readable.js:910:16 at process._tickCallback (node.js:415:13)

It seems that even if there is no error, "resp" can be undefined.