We have noticed that GET requests to /1.1/statuses/lookup.json are occasionally returning an empty string.
I added logging to the twitter-ruby gem here and we got the following output:
[Twitter::REST::Client#perform_request_with_objects] post, /1.1/statuses/lookup.json, {:id=>"621749990424227840"}, nil
[Twitter::REST::Response::ParseJson#on_complete] "", nil
Is it customary for the API to return an empty string? If so, it probably makes sense to make this apparent in the documentation and then I can work on an upstream patch for the twitter-ruby gem. The issue is causing the following exception to happen:
NoMethodError: undefined method `collect' for nil:NilClass
/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:96 in perform_request_with_objects
/gems/twitter-5.14.0/lib/twitter/rest/utils.rb:88 in perform_post_with_objects
/gems/twitter-5.14.0/lib/twitter/rest/tweets.rb:79 in block in statuses
/gems/twitter-5.14.0/lib/twitter/utils.rb:37 in block in pmap
/gems/twitter-5.14.0/lib/twitter/utils.rb:37 in each_slice
/gems/twitter-5.14.0/lib/twitter/utils.rb:37 in each
/gems/twitter-5.14.0/lib/twitter/utils.rb:37 in collect
/gems/twitter-5.14.0/lib/twitter/utils.rb:37 in pmap
/gems/twitter-5.14.0/lib/twitter/utils.rb:25 in flat_pmap
/gems/twitter-5.14.0/lib/twitter/rest/tweets.rb:78 in statuses
If it is not customary for this to happen, then I am happy to provide additional details to help debug this issue on your side.
Thanks,
Henry Hsu
Zendesk | Engineering Manager | Team Fortress