Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace OCA\DAV\Connector\Sabre;

use Aws\S3\Exception\S3Exception;
use OC\Files\Utils\PathHelper;
use OC\Files\View;
use OCA\DAV\AppInfo\Application;
Expand Down Expand Up @@ -455,7 +456,7 @@ public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
if (!$renameOkay) {
throw new \Sabre\DAV\Exception\Forbidden('');
}
} catch (StorageNotAvailableException $e) {
} catch (StorageNotAvailableException|S3Exception $e) {
throw new ServiceUnavailable($e->getMessage(), $e->getCode(), $e);
} catch (ForbiddenException $ex) {
throw new Forbidden($ex->getMessage(), $ex->getRetry(), $ex);
Expand Down
4 changes: 4 additions & 0 deletions lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace OC\Files\Storage;

use Aws\S3\Exception\S3Exception;
use OC\Files\Cache\Cache;
use OC\Files\Cache\CacheDependencies;
use OC\Files\Cache\Propagator;
Expand Down Expand Up @@ -563,6 +564,9 @@ public function copyFromStorage(IStorage $sourceStorage, string $sourceInternalP
try {
$this->writeStream($targetInternalPath, $source);
$result = true;
} catch (S3Exception $e) {
Server::get(LoggerInterface::class)->warning('Failed to copy stream to storage', ['exception' => $e]);
throw $e;
} catch (\Exception $e) {
Server::get(LoggerInterface::class)->warning('Failed to copy stream to storage', ['exception' => $e]);
}
Expand Down
Loading