Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GitHub Mirror
Nextcloud
server
Commits
a6bc871c
Unverified
Commit
a6bc871c
authored
Feb 22, 2022
by
John Molakvoæ
Committed by
GitHub
Feb 22, 2022
Browse files
Merge pull request #31261 from nextcloud/external-share-availability-error
parents
d06716db
b8752c59
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/files_sharing/lib/External/Storage.php
View file @
a6bc871c
...
...
@@ -222,22 +222,20 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage {
// we remove the invalid storage
$this
->
manager
->
removeShare
(
$this
->
mountPoint
);
$this
->
manager
->
getMountManager
()
->
removeMount
(
$this
->
mountPoint
);
throw
new
StorageInvalidException
();
throw
new
StorageInvalidException
(
"Remote share not found"
,
0
,
$e
);
}
else
{
// Nextcloud instance is gone, likely to be a temporary server configuration error
throw
new
StorageNotAvailableException
();
throw
new
StorageNotAvailableException
(
"No nextcloud instance found at remote"
,
0
,
$e
);
}
}
catch
(
ForbiddenException
$e
)
{
// auth error, remove share for now (provide a dialog in the future)
$this
->
manager
->
removeShare
(
$this
->
mountPoint
);
$this
->
manager
->
getMountManager
()
->
removeMount
(
$this
->
mountPoint
);
throw
new
StorageInvalidException
();
throw
new
StorageInvalidException
(
"Auth error when getting remote share"
);
}
catch
(
\
GuzzleHttp\Exception\ConnectException
$e
)
{
throw
new
StorageNotAvailableException
();
throw
new
StorageNotAvailableException
(
"Failed to connect to remote instance"
,
0
,
$e
);
}
catch
(
\
GuzzleHttp\Exception\RequestException
$e
)
{
throw
new
StorageNotAvailableException
();
}
catch
(
\
Exception
$e
)
{
throw
$e
;
throw
new
StorageNotAvailableException
(
"Error while sending request to remote instance"
,
0
,
$e
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment