lib/fb_graph/node.rb in fb_graph-2.5.9 vs lib/fb_graph/node.rb in fb_graph-2.6.0
- old
+ new
@@ -133,17 +133,17 @@
# ref) http://forum.developers.facebook.com/viewtopic.php?pid=228256#p228256
raise NotFound.new('Graph API returned false, so probably it means your requested object is not found.')
when 'null'
nil
else
- _response_ = JSON.parse(response.body).with_indifferent_access
+ _response_ = MultiJson::load(response.body).with_indifferent_access
if (200...300).include?(response.status)
_response_
else
Exception.handle_httpclient_error(_response_, response.headers)
end
end
- rescue JSON::ParserError
+ rescue MultiJson::DecodeError
raise Exception.new(response.status, "Unparsable Response: #{response.body}")
end
end
end