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:
parent
53b295456d
commit
cf6cbf4870
|
@ -32,6 +32,7 @@ namespace OCA\Files_Sharing\External;
|
||||||
|
|
||||||
use GuzzleHttp\Exception\ClientException;
|
use GuzzleHttp\Exception\ClientException;
|
||||||
use GuzzleHttp\Exception\ConnectException;
|
use GuzzleHttp\Exception\ConnectException;
|
||||||
|
use GuzzleHttp\Exception\RequestException;
|
||||||
use OC\Files\Storage\DAV;
|
use OC\Files\Storage\DAV;
|
||||||
use OC\ForbiddenException;
|
use OC\ForbiddenException;
|
||||||
use OCA\Files_Sharing\ISharedStorage;
|
use OCA\Files_Sharing\ISharedStorage;
|
||||||
|
@ -279,6 +280,8 @@ class Storage extends DAV implements ISharedStorage {
|
||||||
$returnValue = false;
|
$returnValue = false;
|
||||||
} catch (ClientException $e) {
|
} catch (ClientException $e) {
|
||||||
$returnValue = false;
|
$returnValue = false;
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
$returnValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache->set($url, $returnValue, 60*60*24);
|
$cache->set($url, $returnValue, 60*60*24);
|
||||||
|
|
Loading…
Reference in New Issue