Skip to content

fix: map ErrNotExist to NotFound in RestoreRecycleItem - #740

Merged
mzner merged 1 commit into
mainfrom
fix/OCISDEV-1370-restore-trashed-item-notfound
Sep 17, 2026
Merged

mzner merged 1 commit into
mainfrom
fix/OCISDEV-1370-restore-trashed-item-notfound

Conversation

@mzner

@mzner mzner commented Sep 17, 2026 •

Copy link
Copy Markdown

Restoring a trash item whose trash-symlink no longer exists (already restored or purged) returned a bare *fs.PathError, surfacing as 500 CODE_INTERNAL instead of 404. Mirror PurgeRecycleItem's existing ErrNotExist -> errtypes.NotFound mapping.

fixes OCISDEV-1370

Restoring a trash item whose trash-symlink no longer exists (already
restored or purged) returned a bare *fs.PathError, surfacing as 500
CODE_INTERNAL instead of 404. Mirror PurgeRecycleItem's existing
ErrNotExist -> errtypes.NotFound mapping.
@mzner
mzner requested a review from a team as a code owner September 17, 2026 07:46
@kw-security

kw-security commented Sep 17, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mzner
mzner merged commit 98fec04 into main Sep 17, 2026
16 checks passed
@mzner
mzner deleted the fix/OCISDEV-1370-restore-trashed-item-notfound branch September 17, 2026 13:12
mzner added a commit to owncloud/ocis that referenced this pull request Sep 18, 2026
…urns 500 (#12969)

fix(deps): bump reva to pull in ErrNotExist->NotFound fix for RestoreRecycleItem

Restoring an already-restored/purged trash item returned 500 CODE_INTERNAL
instead of 404. Fixed upstream in owncloud/reva#740; bump the vendored reva
to 98fec04d9 to pick it up.
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.

3 participants