pksunkara/octonode — Issue #1: Object #<Request> has no method 'errorHandle'
Author: joeframbach
Created: 2012-01-05 21:14:21+00:00
State: open

I'm having difficulty getting the README examples to work.

My script:

var github = require('./lib/octonode');
var authconf = github.auth.config({
username:'joeframbach',
password:'xxxxxxxx'
}).login(['user','repo'], function(token) {
var client = new github.client(token);
var ghuser = client.user('pkumar');
ghuser.info(function(statusCode, body) {
console.log(statusCode,body)
});
});

Output:

/home/joeframbach/git/octonode/lib/octonode/client.js:58
return this.errorHandle(res, JSON.parse(body), callback);
^
TypeError: Object # has no method 'errorHandle'
at Request._callback (/home/joeframbach/git/octonode/lib/octonode/client.js:58:21)
at Request.callback (/home/joeframbach/git/octonode/node_modules/request/main.js:108:22)
at Request. (/home/joeframbach/git/octonode/node_modules/request/main.js:468:18)
at Request.emit (events.js:67:17)
at IncomingMessage. (/home/joeframbach/git/octonode/node_modules/request/main.js:429:16)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.onMessageComplete (http.js:137:23)
at CleartextStream.ondata (http.js:1124:24)
at CleartextStream._push (tls.js:363:27)
at SecurePair.cycle (tls.js:685:20)