Permalink
Browse files

Added support for HTTP Status Code 422, UnprocessableEntity.

  • Loading branch information...
1 parent ff041a5 commit d618634eb86ee7a6d63687244ce60259bf680ed5 @FiXato committed Aug 20, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/rest_client.rb
View
@@ -184,6 +184,11 @@ def process_result(res)
raise Unauthorized
elsif res.code == "404"
raise ResourceNotFound
+ elsif res.code == "422"
+ puts "Unprocessable Entity"
+ puts "HTTP status code #{res.code}\n"
+ puts res.body
+ res
else
raise RequestFailed, res
end

0 comments on commit d618634

Please sign in to comment.