Jelajahi Sumber

Update core/pkg/storage/azurestorage.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Alex Meijer <ameijer@users.noreply.github.com>
Alex Meijer 1 bulan lalu
induk
melakukan
59132f5811
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      core/pkg/storage/azurestorage.go

+ 3 - 0
core/pkg/storage/azurestorage.go

@@ -287,6 +287,9 @@ func (b *AzureStorage) ReadToLocalFile(path, destPath string) error {
 
 	downloadResponse, err := b.containerClient.NewBlobClient(path).DownloadStream(ctx, nil)
 	if err != nil {
+		if b.IsObjNotFoundErr(err) {
+			return DoesNotExistError
+		}
 		return fmt.Errorf("AzureStorage: ReadToLocalFile: failed to download blob %q to %q: %w", path, destPath, err)
 	}
 	// NOTE: automatic retries are performed if the connection fails.