lib/onebox/engine/soundcloud_onebox.rb in onebox-1.7.5 vs lib/onebox/engine/soundcloud_onebox.rb in onebox-1.7.6

- old
+ new

@@ -21,10 +21,11 @@ def oembed_data @oembed_data ||= begin oembed_url = "https://soundcloud.com/oembed.json?url=#{url}" oembed_url << "&maxheight=166" unless url["/sets/"] - Onebox::Helpers.symbolize_keys(::MultiJson.load(Onebox::Helpers.fetch_response(oembed_url).body)) + response = Onebox::Helpers.fetch_response(oembed_url) rescue "{}" + Onebox::Helpers.symbolize_keys(::MultiJson.load(response)) rescue {} end end