Skip to content

[stable34] fix(files): Continue scanning after StorageInvalidException - #66292

Merged
DerDreschner merged 1 commit into
stable34from
backport/65585/stable34
Nov 5, 2026
Merged

DerDreschner merged 1 commit into
stable34from
backport/65585/stable34

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Backport of #65585

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

When a federated share was already removed on the remote end, accessing it triggers a `StorageInvalidException` after the share and its mount are removed locally. When running `occ files:scan`, this exception isn't caught by the scanner and aborts the scan of all remaining mounts of that user, printing a stack trace instead. This can be pretty frustrating on larger instances with many federated shares.

To avoid that, the `StorageInvalidException` is now caught and handled the same way as the `StorageNotAvailableException`: log it as an error, report it through the `StorageNotAvailable` hook and continue with the next mount.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner
DerDreschner force-pushed the backport/65585/stable34 branch from a0591c2 to d9682f9 Compare November 4, 2026 13:45
@DerDreschner
DerDreschner marked this pull request as ready for review November 4, 2026 13:47
@DerDreschner
DerDreschner requested review from a team as code owners November 4, 2026 13:47
@DerDreschner
DerDreschner requested review from GhassenKefi, pabzm and provokateurin and removed request for a team November 4, 2026 13:47
@DerDreschner
DerDreschner merged commit 86f0be8 into stable34 Nov 5, 2026
214 of 227 checks passed
@DerDreschner
DerDreschner deleted the backport/65585/stable34 branch November 5, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants