aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib')
-rw-r--r--activeresource/lib/active_resource/exceptions.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/exceptions.rb b/activeresource/lib/active_resource/exceptions.rb
index 0631cdcf9f..0f4549fd73 100644
--- a/activeresource/lib/active_resource/exceptions.rb
+++ b/activeresource/lib/active_resource/exceptions.rb
@@ -8,7 +8,10 @@ module ActiveResource
end
def to_s
- "Failed with #{response.code} #{response.message if response.respond_to?(:message)}"
+ message = "Failed."
+ message << " Response code = #{response.code}." if response.respond_to?(:code)
+ message << " Response message = #{response.message}." if response.respond_to?(:message)
+ message
end
end