refactor(ObjectStoreStorage): streamline writeStream logging logic

Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
Josh 2026-03-12 12:35:20 -04:00 committed by GitHub
parent 343781e7e9
commit 25728abe2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -547,22 +547,17 @@ class ObjectStoreStorage extends Common implements IChunkedFileWrite {
*/
if (!$exists) {
$this->getCache()->remove($uploadPath);
$this->logger->error(
'Could not create object ' . $urn . ' for ' . $path,
[
'app' => 'objectstore',
'exception' => $ex,
]
);
} else {
$this->logger->error(
'Could not update object ' . $urn . ' for ' . $path,
[
'app' => 'objectstore',
'exception' => $ex,
]
);
}
$operation = $exists ? 'update' : 'create';
$this->logger->error(
sprintf('Could not %s object %s for %s', $operation, $urn, $path),,
[
'app' => 'objectstore',
'exception' => $ex,
]
);
throw new GenericFileException('Error while writing stream to object store', 0, $ex);
}