aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/connection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/connection.rb')
-rw-r--r--activeresource/lib/active_resource/connection.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 22689444b2..132e861292 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -71,7 +71,9 @@ module ActiveResource
response
when 404
raise(ResourceNotFound.new(response))
- when 400...500
+ when 400
+ raise(ResourceInvalid.new(response))
+ when 401...500
raise(ClientError.new(response))
when 500...600
raise(ServerError.new(response))