File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ def process_validation_task_by_id(
4141 :param webhook_url: The webhook URL to send notifications to. Defaults to None.
4242 :raises Exception: If an error occurs during the validation process.
4343
44- :todo: Replace the Crate ID with a more comprehensive system, and replace profile name with URI.
4544 """
4645
46+ # TODO: Split try statements: (1) fetch and validate; (2) write to minio; (3) webhook
47+
4748 file_path = None
4849
4950 try :
@@ -76,9 +77,12 @@ def process_validation_task_by_id(
7677 except Exception as e :
7778 logging .error (f"Error processing validation task: { e } " )
7879
80+ # TODO: Should we write error messages to the minio instance too?
81+
7982 # Send failure notification via webhook
80- error_data = {"profile_name" : profile_name , "error" : str (e )}
81- send_webhook_notification (webhook_url , error_data )
83+ if webhook_url :
84+ error_data = {"profile_name" : profile_name , "error" : str (e )}
85+ send_webhook_notification (webhook_url , error_data )
8286
8387 finally :
8488 # Clean up the temporary file if it was created:
You can’t perform that action at this time.
0 commit comments