Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing JSON attribute: id with Twitter #33

Open
jwoertink opened this issue Dec 6, 2021 · 0 comments
Open

Missing JSON attribute: id with Twitter #33

jwoertink opened this issue Dec 6, 2021 · 0 comments

Comments

@jwoertink
Copy link
Contributor

TwUser.from_json(raw_json).tap do |user|

If the Twitter provider isn't setup properly, you won't get back a valid user json on this line. Since there's no built-in logging here, the only thin you know is of the missing id attribute.

I had to update the code in lib/ to debug what the error was from the raw_json

{"errors":[{"message":"You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve","code":453}]}

Maybe this can just catch the error, and re-raise raw_json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant