diff options
author | Robin Appelman <robin@icewind.nl> | 2016-06-27 21:34:28 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-06-27 21:34:28 +0200 |
commit | 88ef163276fc030006a061358f42746b59c489f3 (patch) | |
tree | 0298a8dfb2aa254f5e68768975503428a03771d9 /lib | |
parent | 3c399be6ecf70fccc3a55fe6c60c5dfc8a7cb1ac (diff) | |
download | nextcloud-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')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 6 |
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; } |