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

S3 Data Store raising Excon::Errors::Conflict while attempting destroy_content #167

Closed
n0nick opened this issue Jan 30, 2012 · 3 comments
Closed

Comments

@n0nick
Copy link

n0nick commented Jan 30, 2012

When trying to save a new file as an attachment, I see save calls destroy_previous which results in an exception:
Excon::Errors::Conflict: Expected(204) <=> Actual(409 Conflict)
The error message is "The bucket you tried to delete is not empty".

I see this type of exception is not rescued on s3data_store.rb.

I'm not sure why it tries to delete the bucket instead of just a file.

@markevans
Copy link
Owner

Hi - thanks for this.
I'd rather raise a separate error than "DataNotFound", because the conflict error doesn't necessarily mean DataNotFound, so I've added a commit that raises a different error, which will be also rescued and logged by the model attachment - see d8cc1a4

@n0nick
Copy link
Author

n0nick commented Feb 22, 2012

Sounds perfect, thanks a lot for the fix :)

@rdetert
Copy link

rdetert commented Jan 30, 2014

Just leaving a note here. I had switched my S3 keys to another account and deleted the buckets in the first account. 10 minutes later, it looks like there was still a naming conflict with the bucket names. I had to change the bucket name in the new account to resolve the error. The error messages returned from S3 didn't make it obvious that this was the case.

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

3 participants