Skip to content

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

Open
@eternaleye

Description

@eternaleye

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions