don't swallow exception from touch
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
85d23dd6fc
commit
e34c20af7d
|
@ -369,7 +369,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
|
|||
'app' => 'objectstore',
|
||||
'message' => 'Could not create object for ' . $path,
|
||||
]);
|
||||
return false;
|
||||
throw $ex;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
namespace OC\Files\ObjectStore;
|
||||
|
||||
use Guzzle\Http\Exception\ClientErrorResponseException;
|
||||
use Guzzle\Http\Exception\CurlException;
|
||||
use Icewind\Streams\RetryWrapper;
|
||||
use OCP\Files\ObjectStore\IObjectStore;
|
||||
use OCP\Files\StorageAuthException;
|
||||
|
@ -157,6 +158,13 @@ class Swift implements IObjectStore {
|
|||
} else {
|
||||
throw $ex;
|
||||
}
|
||||
} catch (CurlException $e) {
|
||||
if ($e->getErrorNo() === 7) {
|
||||
$host = $e->getCurlHandle()->getUrl()->getHost() . ':' . $e->getCurlHandle()->getUrl()->getPort();
|
||||
\OC::$server->getLogger()->error("Can't connect to object storage server at $host");
|
||||
throw new StorageNotAvailableException("Can't connect to object storage server at $host", StorageNotAvailableException::STATUS_ERROR, $e);
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,7 +188,7 @@ class Swift implements IObjectStore {
|
|||
$itemClass = new \stdClass();
|
||||
$itemClass->name = $item['name'];
|
||||
$itemClass->endpoints = array_map(function (array $endpoint) {
|
||||
return (object) $endpoint;
|
||||
return (object)$endpoint;
|
||||
}, $item['endpoints']);
|
||||
$itemClass->type = $item['type'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue