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

twitter returns empty 403 bodies sometimes #2

Closed
jmhodges opened this issue May 16, 2015 · 1 comment
Closed

twitter returns empty 403 bodies sometimes #2

jmhodges opened this issue May 16, 2015 · 1 comment

Comments

@jmhodges
Copy link

Which causes very confusing errors in resp.Parse(). Specifcally, it'll return fmt.Errorf("") because of line 199 in models.go.

I haven't figured out why it's returning 403 with empty bodies (my anaconda set up worked perfectly, so this is confusing).

Two things seem to have to happen: that error message has to be improved, and the case of empty bodies on 403s has to be handled.

The error message can be marginally improved by changing that out to

err = fmt.Errorf("unable to unmarshal Twitter error object (status code %d): %v", r.StatusCode, string(b))

but it would probably be best if that was a specific type so developers can handle it better.

@jmhodges
Copy link
Author

Sorry, made on the wrong repo.

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