diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-17 00:46:32 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-17 00:46:32 +0000 |
commit | e00e6a29410e4ae75abc0480a4d79d07b29008a8 (patch) | |
tree | 4daed4701de72e45da4dfb431eeef120e764321a /activeresource/lib | |
parent | d38417fc02bc12f1182c0821eda6b58ef3b8ca5a (diff) | |
download | rails-e00e6a29410e4ae75abc0480a4d79d07b29008a8.tar.gz rails-e00e6a29410e4ae75abc0480a4d79d07b29008a8.tar.bz2 rails-e00e6a29410e4ae75abc0480a4d79d07b29008a8.zip |
Interpret 422 Unprocessable Entity as ResourceInvalid. Closes #7097.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5967 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index 528a7cc678..8e25ec5eb6 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -90,10 +90,10 @@ module ActiveResource response when 404 raise(ResourceNotFound.new(response)) - when 400 - raise(ResourceInvalid.new(response)) when 409 raise(ResourceConflict.new(response)) + when 422 + raise(ResourceInvalid.new(response)) when 401...500 raise(ClientError.new(response)) when 500...600 |