Skip to content
Snippets Groups Projects
Commit e1dbae14 authored by Vincent Petry's avatar Vincent Petry
Browse files

Properly trigger testRemote after getting a 404 from remote fed share

Whenever a remote fed share's shareinfo call returns a 404, don't
directly assume the storage is not available by throwing
StorageNotAvailableException. We need to properly throw
NotFoundException to trigger the later logic that calls testRemote()
that verifies that the 404 is not from a broken server but really from
an obsolete share.
parent 73d46afc
No related branches found
No related tags found
No related merge requests found
...@@ -252,6 +252,9 @@ class Storage extends DAV implements ISharedStorage { ...@@ -252,6 +252,9 @@ class Storage extends DAV implements ISharedStorage {
if ($e->getCode() === 401 || $e->getCode() === 403) { if ($e->getCode() === 401 || $e->getCode() === 403) {
throw new ForbiddenException(); throw new ForbiddenException();
} }
if ($e->getCode() === 404) {
throw new NotFoundException();
}
// throw this to be on the safe side: the share will still be visible // throw this to be on the safe side: the share will still be visible
// in the UI in case the failure is intermittent, and the user will // in the UI in case the failure is intermittent, and the user will
// be able to decide whether to remove it if it's really gone // be able to decide whether to remove it if it's really gone
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment