lib/parkwhiz/search.rb in parkwhiz-0.1.0 vs lib/parkwhiz/search.rb in parkwhiz-0.2.0

- old
+ new

@@ -14,10 +14,10 @@ request.url SEARCH_PATH request.params['key'] = api_key request.params.merge!(search_parameters) end - raise SearchError.new(response.body['error']) if response.body['error'] + raise SearchError.new(response.body['error']) if response.body.kind_of?(Hash) && response.body['error'] response.body['parking_listings'].collect{|parking_listing_json| Location.new(parking_listing_json)} end end \ No newline at end of file