Skip to content

Instantly share code, notes, and snippets.

@matomesc
Created August 8, 2013 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matomesc/6189715 to your computer and use it in GitHub Desktop.
Save matomesc/6189715 to your computer and use it in GitHub Desktop.
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