lib/itunes_api/request.rb in itunes_api-2.2.1 vs lib/itunes_api/request.rb in itunes_api-2.3.0
- old
+ new
@@ -13,9 +13,11 @@
Faraday.new(url: BASE_URL)
end
def parsed_response
JSON.parse(response.body)
+ rescue JSON::ParserError
+ { 'results' => [] }
end
def response
connection.get(action, query)
end