akshayrai commented on a change in pull request #4221: [TE] Code cleanup - Pull 
out all validation checks from translator into validator modules
URL: https://github.com/apache/incubator-pinot/pull/4221#discussion_r285804483
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlResource.java
 ##########
 @@ -160,7 +156,12 @@ private DetectionConfigDTO 
buildDetectionConfigFromYaml(long tuningStartTime, lo
       tuningStartTime = tuningEndTime - TimeUnit.DAYS.toMillis(28);
     }
 
-    YamlDetectionConfigTranslator translator = 
this.translatorLoader.from(yamlConfig, this.provider);
+    YamlDetectionConfigTranslator translator;
+    try {
+      translator = this.translatorLoader.from(yamlConfig, this.provider);
+    } catch (Exception e) {
+      throw new IllegalArgumentException("Unable to instantiate the detection 
pipeline. Please verify the pipelineType");
 
 Review comment:
   Done!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to