fix(files): Do not throw an exception if the etag is not set in metadata

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau 2024-03-14 11:13:22 +01:00
parent d3da21b10a
commit 8205de75c7
No known key found for this signature in database

View file

@ -159,7 +159,7 @@ class FilesMetadata implements IFilesMetadata {
public function getEtag(string $key): string {
if (!array_key_exists($key, $this->metadata)) {
throw new FilesMetadataNotFoundException();
return '';
}
return $this->metadata[$key]->getEtag();