Catch Request exception in testRemoteUrl

Else the background job fails hard if the remote has for example an
invalid certificate.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-02-15 23:06:21 +01:00
parent bf19431f2a
commit 0e72d38747
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -32,6 +32,7 @@ namespace OCA\Files_Sharing\External;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use OC\Files\Storage\DAV;
use OC\ForbiddenException;
use OCA\Files_Sharing\ISharedStorage;
@ -280,6 +281,8 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage {
$returnValue = false;
} catch (ClientException $e) {
$returnValue = false;
} catch (RequestException $e) {
$returnValue = false;
}
$cache->set($url, $returnValue, 60*60*24);