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

mock_s3 raises wrong exception when versioning is enabled for a bucket #2710

Closed
ikonstantynov opened this issue Jan 30, 2020 · 1 comment · Fixed by #3532
Closed

mock_s3 raises wrong exception when versioning is enabled for a bucket #2710

ikonstantynov opened this issue Jan 30, 2020 · 1 comment · Fixed by #3532

Comments

@ikonstantynov
Copy link

Hi there,

I'm testing some method that calls get_object method from boto3.client('s3'). There is a VersioningConfiguration enabled for a bucket that I'm trying to get a file from.
When I try to test a case where there is no such version for a given file, I'm receiving the wrong error code from moto.

Originally, s3 returns me a response with a response error code = NoSuchVersion while moto is always returning NoSuchKey error code.

Can this NoSuchVersion exception be added?

@bblommers
Copy link
Collaborator

This should now be fixed as of moto >= 1.3.16.dev200

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

Successfully merging a pull request may close this issue.

2 participants