Rails Yelp :: Error :: InvalidParameter - One or more parameters are invalid in the request
I am creating a web application using rails and using appetite api via yelp api gem. Api was working until yesterday, I got this error:
Yelp::Error::InvalidParameter - One or more parameters are invalid in request
I haven't changed the code.
Here is my screech service:
require 'yelp'
class YelpService
def get_detail(id)
begin
yelp_client = Yelp::Client.new({ consumer_key: 'my-consumer-key',
consumer_secret: 'mysecret',
token: 'my-token',
token_secret: 'mytoken-secret'
})
Rails.logger.info "yelp client #{yelp_client}"
Rails.logger.info "id #{id}"
yelp_response = yelp_client.business(id)
Rails.logger.info "yelp response #{yelp_response}"
if yelp_response
return yelp_response.rating_img_url
else
Rails.logger.info "Error in yelp client call"
end
rescue Exception => e
# Mandrill errors are thrown as exceptions
Rails.logger.info "Error occurred in yelp service: #{e.class} - #{e.message}"
return "none"
end
end
private
attr_reader :id
end
I tried changing the mandrill key but no effect. Please help me to solve this problem.
+3
source to share
1 answer
tried to find exactly where the error is
https://codeclimate.com/github/Yelp/yelp-ruby/Yelp::Error::InvalidParameter
-1
source to share