This repository was archived by the owner on May 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,16 +245,16 @@ def messagify_flake(
245245
246246
247247def specific_error_message (upload_error : UploadError ) -> str :
248- title = f"### :x: { upload_error .error_code } "
249- if upload_error .error_code == "Unsupported file format " :
248+ title = f"### :x: { upload_error .error_code . replace ( '_' , ' ' ). capitalize () } "
249+ if upload_error .error_code == "unsupported_file_format " :
250250 description = "\n " .join (
251251 [
252252 "Upload processing failed due to unsupported file format. Please review the parser error message:" ,
253253 f"`{ upload_error .error_params ['error_message' ]} `" ,
254254 "For more help, visit our [troubleshooting guide](https://docs.codecov.com/docs/test-analytics#troubleshooting)." ,
255255 ]
256256 )
257- elif upload_error .error_code == "File not found " :
257+ elif upload_error .error_code == "file_not_in_storage " :
258258 description = "\n " .join (
259259 [
260260 "No result to display due to the CLI not being able to find the file." ,
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ def test_specific_error_message(mocker):
279279 upload = UploadFactory ()
280280 error = UploadError (
281281 report_upload = upload ,
282- error_code = "Unsupported file format " ,
282+ error_code = "unsupported_file_format " ,
283283 error_params = {
284284 "error_message" : "Error parsing JUnit XML in test.xml at 4:32: ParserError: No name found"
285285 },
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def process_individual_upload(
9595 upload .state = "v2_processed"
9696 new_upload_error = UploadError (
9797 upload_id = upload .id ,
98- error_code = "File not found " ,
98+ error_code = "file_not_in_storage " ,
9999 error_params = {},
100100 )
101101 db_session .add (new_upload_error )
@@ -120,7 +120,7 @@ def process_individual_upload(
120120 upload .state = "v2_processed"
121121 new_upload_error = UploadError (
122122 upload_id = upload .id ,
123- error_code = "Unsupported file format " ,
123+ error_code = "unsupported_file_format " ,
124124 error_params = {"error_message" : str (exc )},
125125 )
126126 db_session .add (new_upload_error )
You can’t perform that action at this time.
0 commit comments