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

Return 404 if document type does not exist #33330

Merged

Conversation

johansolbakken
Copy link
Contributor

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

vekterli
vekterli previously approved these changes Feb 14, 2025
Copy link
Member

@vekterli vekterli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vekterli
Copy link
Member

I see there are a couple of storageserver tests that need to have their source of truth updated:

[  FAILED  ] CommunicationManagerTest.unmapped_bucket_space_documentapi_request_returns_error_reply
[  FAILED  ] CommunicationManagerTest.unmapped_bucket_space_for_get_documentapi_request_returns_error_reply

After a bit of additional pondering on the issue I'm also wondering if we want to restrict when we remap this error code to 404. It makes sense for Gets, but the bucket space resolving logic is also invoked for mutating operations like Puts. What would be the appropriate error code here? It's still conceptually trying to go via a resource (document type) that does not exist, but it's not a read-operation... The existing 500 response is very suboptimal either way.

Copy link
Member

@vekterli vekterli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vekterli vekterli merged commit 339aa48 into master Feb 21, 2025
3 checks passed
@vekterli vekterli deleted the johsol/return-404-instead-of-500-for-unknown-document-type branch February 21, 2025 15:13
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

Successfully merging this pull request may close these issues.

2 participants