@@ -73,7 +73,7 @@ def load_releases_from_file(json_file):
7373 return data .get ('releases' , [])
7474 except Exception as e :
7575 logging .error (f"Error loading releases from { json_file } : { e } " )
76- return []
76+ sys . exit ( ERROR_CODES [ "file_not_found" ])
7777
7878def save_releases (releases , json_file ):
7979 """Save releases to a JSON file."""
@@ -105,7 +105,7 @@ def fetch_s3_bucket_contents(args):
105105
106106 except Exception as e :
107107 logging .error (f"Error fetching S3 bucket contents: { e } " )
108- return []
108+ sys . exit ( ERROR_CODES [ "s3_error" ])
109109
110110def update_flavors (release ):
111111 """Update flavors for a release."""
@@ -176,7 +176,7 @@ def process_releases(args):
176176 logging .info ("Successfully downloaded files from S3" )
177177 except Exception as e :
178178 logging .error (f"Error downloading files from S3: { e } " )
179- return
179+ sys . exit ( ERROR_CODES [ "s3_error" ])
180180
181181 # Get artifacts from artifacts bucket
182182 logging .info (f"Fetching artifacts data from S3 bucket { DEFAULTS ['ARTIFACTS_S3_BUCKET_NAME' ]} " )
@@ -271,6 +271,7 @@ def process_releases(args):
271271
272272 except Exception as e :
273273 logging .error (f"Error processing { json_file } : { e } " , exc_info = True )
274+ sys .exit (ERROR_CODES ["input_error" ])
274275
275276 # Upload to S3 if requested and files were modified
276277 if args .s3_update and successful_files :
@@ -280,6 +281,7 @@ def process_releases(args):
280281 logging .info ("Successfully uploaded files to S3" )
281282 except Exception as e :
282283 logging .error (f"Error uploading files to S3: { e } " )
284+ sys .exit (ERROR_CODES ["s3_error" ])
283285
284286 # Log summary
285287 logging .info ("\n Update Summary:" )
0 commit comments