Skip to content

Error codes in V2 v. V1? #1858

Discussion options

You must be logged in to vote

Unfortunately, Twitter's API doesn't actually return an error code or message in the response to Client.create_tweet with a restricted in_reply_to_tweet_id.

Despite what https://developer.twitter.com/en/support/twitter-api/error-troubleshooting says, the response doesn't include an errors field:
{"detail":"You are not allowed to reply to this Tweet as the Tweet author has restricted who can reply to this Tweet.","type":"about:blank","title":"Forbidden","status":403}

This exemplifies the issue with inconsistency in error response structures with Twitter API v2 that I encountered when I reworked exceptions in the library while adding support for Twitter API v2.

Since there seems to be a rel…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@GanizaniSitara
Comment options

Answer selected by Harmon758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question This is a question API This is regarding Twitter's API
2 participants