summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-06-27 21:34:28 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-06-27 21:34:28 +0200
commit88ef163276fc030006a061358f42746b59c489f3 (patch)
tree0298a8dfb2aa254f5e68768975503428a03771d9 /lib/private/Files/Storage
parent3c399be6ecf70fccc3a55fe6c60c5dfc8a7cb1ac (diff)
downloadnextcloud-server-88ef163276fc030006a061358f42746b59c489f3.tar.gz
nextcloud-server-88ef163276fc030006a061358f42746b59c489f3.zip
handle unavailable fed shares while testing for availability (#25277)
* More explicit http status codes * handle unavailable fed shares while testing for availability
Diffstat (limited to 'lib/private/Files/Storage')
-rw-r--r--lib/private/Files/Storage/DAV.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 0d41b3bab02..c8088a41c47 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -814,13 +814,13 @@ class DAV extends Common {
private function convertException(Exception $e, $path = '') {
Util::writeLog('files_external', $e->getMessage(), Util::ERROR);
if ($e instanceof ClientHttpException) {
- if ($e->getHttpStatus() === 423) {
+ if ($e->getHttpStatus() === Http::STATUS_LOCKED) {
throw new \OCP\Lock\LockedException($path);
}
- if ($e->getHttpStatus() === 401) {
+ if ($e->getHttpStatus() === Http::STATUS_UNAUTHORIZED) {
// either password was changed or was invalid all along
throw new StorageInvalidException(get_class($e) . ': ' . $e->getMessage());
- } else if ($e->getHttpStatus() === 405) {
+ } else if ($e->getHttpStatus() === Http::STATUS_METHOD_NOT_ALLOWED) {
// ignore exception for MethodNotAllowed, false will be returned
return;
}