You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
I think it would be much better to raise errors that have common form: for example a dictionary with number, message and so on. Even if some of them will be empty it is still easier to parse than check what's inside that error, if it is a list of dictionary, string or something else. For example: if you try to get timeline from user that doesn't exist, it returns: twitter.TwitterError([{u'code': 34, u'message': u'Sorry, that page does not exist'}])
but when you try to access user with private tweets it raises only that: twitter.TwitterError(u'Not authorized.')
I think it would be much better to raise errors that have common form: for example a dictionary with number, message and so on. Even if some of them will be empty it is still easier to parse than check what's inside that error, if it is a list of dictionary, string or something else. For example: if you try to get timeline from user that doesn't exist, it returns:
twitter.TwitterError([{u'code': 34, u'message': u'Sorry, that page does not exist'}])but when you try to access user with private tweets it raises only that:
twitter.TwitterError(u'Not authorized.')