Skip to content

Instantly share code, notes, and snippets.

@dekz
Created May 30, 2012 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dekz/6e2c0b55416c9abe0b36 to your computer and use it in GitHub Desktop.
Save dekz/6e2c0b55416c9abe0b36 to your computer and use it in GitHub Desktop.
begin
RestClient.get 'http://bad-url.com/alalalalal'
rescue => e
raise 'Err' if e.status == 400
end
resp = RestClient.get 'http://bad-url.com/alalalalal'
raise 'Err' if resp.status == 400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment