Added 403 and 404 error handling for viewing tweets

This commit is contained in:
2015-06-13 07:35:04 -05:00
parent 2279e14623
commit f71506adf8
2 changed files with 17 additions and 2 deletions

View File

@@ -118,3 +118,10 @@ def is_allowed(tweet, clients):
allowed = False
log.exception("Tuit not allowed: %s" % (tweet["text"],))
return allowed
def twitter_error(error):
if error.error_code == 403:
msg = _(u"Sorry, you are not authorised to see this status.")
elif error.error_code == 404:
msg = _(u"No status found with that ID")
output.speak(msg)