Skip to content

Instantly share code, notes, and snippets.

@admc
Created November 26, 2012 06:11
Show Gist options
  • Save admc/4146803 to your computer and use it in GitHub Desktop.
Save admc/4146803 to your computer and use it in GitHub Desktop.
errr
/Users/adam/Projects/developerexchange.io/model.js:15
exports.User.load(info.id, function(err, temp) {
^
TypeError: Cannot read property 'id' of undefined
at Base.save (/Users/adam/Projects/developerexchange.io/model.js:15:29)
at Object.exports.handle (/Users/adam/Projects/developerexchange.io/node_modules/nano/node_modules/errs/lib/errs.js:191:5)
at Request._callback (/Users/adam/Projects/developerexchange.io/node_modules/nano/nano.js:298:16)
at Request.init.self.callback (/Users/adam/Projects/developerexchange.io/node_modules/nano/node_modules/request/main.js:120:22)
at Request.EventEmitter.emit (events.js:91:17)
at Request.<anonymous> (/Users/adam/Projects/developerexchange.io/node_modules/nano/node_modules/request/main.js:555:16)
at Request.EventEmitter.emit (events.js:88:17)
at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/Users/adam/Projects/developerexchange.io/node_modules/nano/node_modules/request/main.js:517:14)
at IncomingMessage.EventEmitter.emit (events.js:115:20)
at IncomingMessage._emitEnd (http.js:366:10)
@dscape
Copy link

dscape commented Nov 26, 2012

Looks like you are not checking for if (err) {} in your callback.

Either that or remember that in nano the second argument is the body, not the third

function nano_cb(err, body, response) {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment