vincentchenjl commented on a change in pull request #4814: [TE][notification] 
Minor cleaning up of the jira related code
URL: https://github.com/apache/incubator-pinot/pull/4814#discussion_r345513440
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/notification/formatter/channels/JiraContentFormatter.java
 ##########
 @@ -156,13 +135,43 @@ private JiraEntity buildJiraEntity(String jiraTemplate, 
Map<String, Object> temp
       Template template = freemarkerConfig.getTemplate(jiraTemplate);
       template.process(templateValues, out);
 
-      String alertEmailHtml = new String(baos.toByteArray(), CHARSET);
+      description = new String(baos.toByteArray(), CHARSET);
+    } catch (Exception e) {
+      description = "Found an exception while constructing the description 
content. Pls report & reach out"
+          + " to the Thirdeye team. Exception = " + e.getMessage();
+    }
+
+    return description;
 
 Review comment:
   When an exception is thrown, should `description` be `null` or empty, as I 
see that you assign empty string for snapshot if there is an error.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to