summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-02-22 10:55:04 +0100
committerGitHub <noreply@github.com>2022-02-22 10:55:04 +0100
commita6bc871c96d071ef54d9fd3b547df606fa9d19ca (patch)
treea471832cff08d76f528f0339f34ac749c069073b /apps/files_sharing
parentd06716db214040f9ee8755df4d03b11d5b77c64d (diff)
parentb8752c59cdc06fb976cd5c530389ff4f9571ae58 (diff)
downloadnextcloud-server-a6bc871c96d071ef54d9fd3b547df606fa9d19ca.tar.gz
nextcloud-server-a6bc871c96d071ef54d9fd3b547df606fa9d19ca.zip
Merge pull request #31261 from nextcloud/external-share-availability-error
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/External/Storage.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index 23e5ac3ea26..ffa5fb8716d 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -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);
}
}