@@ -631,7 +631,14 @@ final class ExportedBlob extends ExportedObject {
631631 // _retouchDeadline
632632 final retouchDeadline = clock.agoBy (_updateValidatedAfter);
633633 if (destinationInfo.metadata.validated.isBefore (retouchDeadline)) {
634- await _owner._bucket.updateMetadata (dst, _metadata ());
634+ try {
635+ await _owner._bucket.updateMetadata (dst, _metadata ());
636+ } catch (e, st) {
637+ // This shouldn't happen, but if a metadata update does fail, it's
638+ // hardly the end of the world.
639+ // We might detect stray files later as a result of this.
640+ _log.warning ('Failed to updateMetadata on "$dst " failed' , e, st);
641+ }
635642 }
636643 return ;
637644 }
@@ -659,7 +666,14 @@ extension on Bucket {
659666 if (info.isSameContent (bytes)) {
660667 if (info.metadata.validated
661668 .isBefore (clock.agoBy (_updateValidatedAfter))) {
662- await updateMetadata (name, metadata);
669+ try {
670+ await updateMetadata (name, metadata);
671+ } catch (e, st) {
672+ // This shouldn't happen, but if a metadata update does fail, it's
673+ // hardly the end of the world.
674+ // We might detect stray files later as a result of this.
675+ _log.warning ('Failed to updateMetadata on "$name " failed' , e, st);
676+ }
663677 }
664678 return ;
665679 }
0 commit comments