Change to add exception instead of logging error 73/10973/1
authorjosephthaliath <jo.thaliath@samsung.com>
Tue, 25 Apr 2023 06:36:19 +0000 (12:06 +0530)
committerjosephthaliath <jo.thaliath@samsung.com>
Tue, 25 Apr 2023 06:36:19 +0000 (12:06 +0530)
Issue-Id: AIMLFW-40

Change-Id: Ia7fcceb2d86c23901086fc638958e6ec252e6be2
Signed-off-by: josephthaliath <jo.thaliath@samsung.com>
trainingmgr/common/trainingmgr_operations.py

index cece95c..110f197 100644 (file)
@@ -24,6 +24,7 @@ Training manager main operations
 import json
 import requests
 import validators
+from trainingmgr.common.exceptions_utls import TMException
 
 def create_url_host_port(protocol, host, port, path=''):
     """
@@ -31,8 +32,7 @@ def create_url_host_port(protocol, host, port, path=''):
     """
     url = protocol + '://' + host + ':' + port + '/' + path
     if not validators.url(url):
-        logger.debug('URL validation error: ',url)
-        return None
+        raise TMException('URL validation error: '+ url)
     return url
 
 def data_extraction_start(training_config_obj, trainingjob_name, feature_list, query_filter,