diff --git a/codecov_cli/services/upload/__init__.py b/codecov_cli/services/upload/__init__.py index 2793c392..0d077352 100644 --- a/codecov_cli/services/upload/__init__.py +++ b/codecov_cli/services/upload/__init__.py @@ -104,6 +104,16 @@ def do_upload_logic( upload_data = collector.generate_upload_data(report_type) except click.ClickException as exp: if handle_no_reports_found: + if slug is None: + logger.warning( + "No coverage reports found. Cannot trigger upload completion: no slug provided." + ) + return RequestResult( + error=None, + warnings=None, + status_code=200, + text="No coverage reports found. Upload completion skipped: no slug provided.", + ) logger.info( "No coverage reports found. Triggering notifications without uploading." )