Repository navigation
fix: list shares, handle reva errors more gracefully - #11245
Merged
Merged
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
mklos-kw
force-pushed
the
feat/list-shares
branch
2 times, most recently
from
April 23, 2025 06:22
c0d5c6c to
9c73b2a
Compare
mklos-kw
commented
Apr 23, 2025
| }, driveItems) | ||
| if err != nil { | ||
| s.logger.Error().Err(err).Str("storageID", itemID.GetStorageId()).Msg("listPublicShares failed") | ||
| if err != nil && !strings.Contains(err.Error(), errtypes.ERR_ALREADY_EXISTS) { |
Member
Author
There was a problem hiding this comment.
Comparing error by string, because the errtype from reva does not pass through error interface.
Alternatives to change the error type in the API or errtype in reva would have much wider refactoring.
mklos-kw
force-pushed
the
feat/list-shares
branch
2 times, most recently
from
April 23, 2025 06:34
6c36377 to
8fbe998
Compare
mklos-kw
force-pushed
the
feat/list-shares
branch
7 times, most recently
from
April 24, 2025 08:23
06b2967 to
5e79548
Compare
mklos-kw
force-pushed
the
feat/list-shares
branch
from
April 30, 2025 10:52
d38d9a6 to
1fbb082
Compare
mklos-kw
marked this pull request as ready for review
April 30, 2025 11:31
kobergj
requested changes
Apr 30, 2025
| }, driveItems) | ||
| if err != nil { | ||
| s.logger.Error().Err(err).Str("storageID", itemID.GetStorageId()).Msg("listPublicShares failed") | ||
| s.logger.Error().Err(err).Str("storageID", itemID.GetStorageId()).Msg("listPublicShares failed") |
Contributor
There was a problem hiding this comment.
We want the log inside the if-clause don't we?
mklos-kw
force-pushed
the
feat/list-shares
branch
from
April 30, 2025 16:00
1fbb082 to
c8c0996
Compare
mklos-kw
force-pushed
the
feat/list-shares
branch
2 times, most recently
from
April 30, 2025 21:14
6b3d7dd to
012c727
Compare
|
2403905
approved these changes
May 9, 2025
kobergj
approved these changes
May 9, 2025
butonic
added a commit
to opencloud-eu/opencloud
that referenced
this pull request
Nov 13, 2026
When the public share manager cannot access its metadata space, e.g. after an upgrade, listing public shares fails with an already exists error and the whole permissions request ended in a 500. The space members dialog in web then just keeps spinning. We now log a warning, skip the link permissions and still return the user and space permissions. Our reva currently replaces the original error with a generic "error listing public shares", so this only takes effect together with the port of `owncloud/reva#264`, which passes the error message through. ported from `owncloud/ocis#11245` Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
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.



Description
Handle gracefully the error mentioned by the issues. Unblock the space members API by recognizing the reva 'AlreadyExists'. Return HTTP OK 200 with remaining shares instead of HTTP Internal Server Error 5XX.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: