Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.error.raise on 403 Forbidden responses causes method_missing blowup #115

Open
eternaleye opened this issue Jun 14, 2016 · 1 comment
Open

Comments

@eternaleye
Copy link

When attempting to find a bucket, a 403 response's error member, when raised, explodes due to a missing message member.

/usr/local/share/gems/gems/aws-s3-0.6.3/lib/aws/s3/error.rb:63:in `method_missing': undefined local variable or method `message' for #<AWS::S3::Error:0x0000000248e840> (NameError)
        from /usr/local/share/gems/gems/aws-s3-0.6.3/lib/aws/s3/error.rb:38:in `raise'
        from /usr/local/share/gems/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:72:in `request'
        from /usr/local/share/gems/gems/aws-s3-0.6.3/lib/aws/s3/base.rb:88:in `get'
        from /usr/local/share/gems/gems/aws-s3-0.6.3/lib/aws/s3/bucket.rb:102:in `find'
        from write_file.rb:101:in `<main>'

The 403 error itself was made more difficult to debug by this, as we had to step down a ways into aws-s3 to find it at all.

@harrykas
Copy link

harrykas commented Jul 22, 2016

My Ceph RadosGW service does not return 'message' element in error response, so I've replaced it with 'code' element and created pull request: #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants