markdown: Link the twitter response code docs inline.

This commit is contained in:
Alex Vandiver 2020-07-30 23:22:38 -07:00 committed by Tim Abbott
parent 03ca3afbc2
commit 90cdda9836
1 changed files with 1 additions and 0 deletions

View File

@ -412,6 +412,7 @@ def fetch_tweet_data(tweet_id: str) -> Optional[Dict[str, Any]]:
except twitter.TwitterError as e: except twitter.TwitterError as e:
t = e.args[0] t = e.args[0]
if len(t) == 1 and ('code' in t[0]): if len(t) == 1 and ('code' in t[0]):
# https://developer.twitter.com/en/docs/basics/response-codes
code = t[0]['code'] code = t[0]['code']
if code in [34, 144, 421, 422]: if code in [34, 144, 421, 422]:
# All these "correspond with HTTP 404," and mean # All these "correspond with HTTP 404," and mean