Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Twit doesn't return instances of Error when errors occur
var Twit = require('twit');
var t = new Twit({
consumer_key: 'a',
consumer_secret: 'b',
access_token: 'c',
access_token_secret: 'd'
});
t.get('user/timeline', function (err, result) {
// err is just a plain object - we should instead return instances of Error (and still keep all of twitter's details)
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment