diff --git a/lib/aws/s3/error.rb b/lib/aws/s3/error.rb index f4c4011..c7b1438 100644 --- a/lib/aws/s3/error.rb +++ b/lib/aws/s3/error.rb @@ -59,6 +59,8 @@ def method_missing(method, *args, &block) # We actually want nil if the attribute is nil. So we use has_key? rather than [] + ||. if error.has_key?(method.to_s) error[method.to_s] + elsif method.to_s == 'message' + code else super end @@ -66,4 +68,4 @@ def method_missing(method, *args, &block) end end end -#:startdoc: \ No newline at end of file +#:startdoc: