Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the Body Response in JSON has an error message ({error : "error_message"}) #3

Open
nsanta opened this issue Jul 22, 2010 · 1 comment

Comments

@nsanta
Copy link

nsanta commented Jul 22, 2010

When the Body Response in JSON has an error message ({error : "error_message"}), the resquest method returns nil. Instead of, should return an error message or raise an Exception.

@amithgeorge
Copy link

Foursquare documentation states that such messages are sent back with a HTTP status code of 501. The gem currently doesnt check for this status code. That might explain why it doesnt raise an exception. I unpacked the gem and added the following code. Hopefully it should handle this case

add to the function raise_errors

when 501
raise BadRequest, message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants