Unable to decode response exception

18 views
Skip to first unread message

Rajinder Yadav

unread,
Jan 25, 2012, 6:07:16 AM1/25/12
to Grackle Development
I got the following error (below), which was caused by code from the
following line:

followers = client.followers.ids? :screen_name => "SomeOne"

possible this is a bug in grackle

google won't let me copy the exception trace, so I've pasted it here,
maybe you can figure out how to fix the bug: http://pastie.org/3249114

Hayes Davis

unread,
Jan 25, 2012, 1:23:51 PM1/25/12
to grac...@googlegroups.com
Rajinder,

This happens when Twitter sends back a response that is not in the requested format (e.g. an HTML error page in response to a JSON API request). While I agree that the raised error could be a little more clearly named, I believe it is appropriate for Grackle to raise an error in this situation. It's clearly an exceptional situation which I believe should be handled by the code using Grackle. In my experience with the Twitter API it's best to retry a short time later after receiving an exception like this since it's almost always transient.

If you'd like to wrap errors of this type in a different kind of exception, I'm open to that. At a minimum please feel free to file an issue at https://github.com/hayesdavis/grackle/issues. I'm also open to pull requests.

Hayes
Reply all
Reply to author
Forward
0 new messages