Created
August 8, 2013 23:17
-
-
Save matomesc/6189715 to your computer and use it in GitHub Desktop.
Twit doesn't return instances of Error when errors occur
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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