Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Fix NameError for 412Error on 412 without body #65

Merged
merged 1 commit into from
Jun 12, 2014

Conversation

sorah
Copy link
Contributor

@sorah sorah commented Jun 11, 2014

>> Aws::S3.new.head_object(if_unmodified_since: '2014-06-09 12:44:21 +0900',
bucket: '...', key: '...')
NameError: wrong constant name 412Error

by the way, current implementation of ErrorHandler#.error_code_for_empty_response makes invalid string for constant name (ex: 412Error)when pre-defined error constant not found, is this expected?

>> Aws::S3.new.head_object(if_unmodified_since: '2014-06-09 12:44:21 +0900', bucket: '...', key: '...')
NameError: wrong constant name 412Error
@sorah
Copy link
Contributor Author

sorah commented Jun 11, 2014

note: get_object returns body for 412 error, so it succeeds

>> Aws::S3.new.get_object(if_unmodified_since: '2014-06-09 12:44:21 +0900', bucket: '...', key: '...')
Aws::S3::Errors::PreconditionFailed: At least one of the pre-conditions you specified did not hold

trevorrowe added a commit that referenced this pull request Jun 12, 2014
Fix NameError for `412Error` on 412 without body
@trevorrowe trevorrowe merged commit 976709b into amazon-archives:master Jun 12, 2014
@trevorrowe
Copy link
Contributor

Thanks!

@sorah sorah deleted the fix-412error branch June 13, 2014 04:25
trevorrowe added a commit that referenced this pull request Jun 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants