Created
June 5, 2012 19:11
-
-
Save michaelhelmick/2877078 to your computer and use it in GitHub Desktop.
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
except (facebook.GraphAPIError, DrundWorkerError, urllib2.HTTPError), e: | |
error = 'Unable to retrieve feed.' | |
if isinstance(e, urllib2.HTTPError): | |
try: | |
fb_error = json.loads(e.read()) | |
error = fb_error['error']['message'] | |
if fb_error['error']['type'] == 'OAuthException': | |
error += ' Please unauthorize Facebook via Settings > Manage Applications and then authenticate again.' | |
except ValueError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment