Repository navigation
fix(publicshareprovider): do not fail listing public shares when the metadata space is not accessible - #996
Merged
Conversation
The ERR_ALREADY_EXISTS prefix dropped the space between "already exists:" and the detail, so every AlreadyExists message changed from "error: already exists: foo" to "error: already exists:foo". We now append the space in Error() and keep the prefix without it, so strings.Contains checks on the prefix still match. Also add specs for ListPublicShares: an AlreadyExists error from the share manager (the metadata space exists but the service user cannot see it) yields an OK response with no shares, other errors stay an internal error carrying the error message. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
dragonchaser
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We now answer ListPublicShares with an OK status and no shares when the share manager reports an AlreadyExists error. That happens when the jsoncs3 public share metadata space exists but the service user cannot list it. Previously the whole request failed with an internal error, which also broke listing the members of a space.
Other errors still return an internal error, now carrying the error message instead of a generic "error listing public shares".
errtypes gains an ERR_ALREADY_EXISTS prefix constant so callers that only see a status message can detect the error. AlreadyExists messages stay unchanged.
Review focus:
Review commit by commit.
Assisted by Claude Code (claude-opus-5-5): it ported the change, wrote the adaptation commit, the specs and this description.