From 625918fca3836806b1bfbe2710d8c56b80f6c71b Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 10:49:39 +0000 Subject: [PATCH] fix: gracefully handle missing files during upload --- codecov_cli/services/upload/upload_sender.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/codecov_cli/services/upload/upload_sender.py b/codecov_cli/services/upload/upload_sender.py index db8658d3..c839719c 100644 --- a/codecov_cli/services/upload/upload_sender.py +++ b/codecov_cli/services/upload/upload_sender.py @@ -189,7 +189,15 @@ def _get_file_fixers( return file_fixers def _get_files(self, upload_data: UploadCollectionResult): - return [self._format_file(file) for file in upload_data.files] + files = [] + for file in upload_data.files: + try: + files.append(self._format_file(file)) + except FileNotFoundError: + logger.warning( + f"File not found, skipping: {file.path}", + ) + return files def _format_file(self, file: UploadCollectionResultFile): format, formatted_content = self._get_format_info(file)