Improved error handling for Twitter.