- send_notification = True
- if (isinstance(notify, bool) and not notify) or \
- (isinstance(notify, str) and notify.lower() in [ "f", "false", "n", "no" ]):
- send_notification = False
+ if msg:
+ result = {"ERROR": msg}
+
+ DTIWeb.logger.error("%s: dti_event=%s result=%s", \
+ req_info, str_dti_event, json.dumps(result))
+ else:
+ send_notification = True
+ if (isinstance(notify, bool) and not notify) or \
+ (isinstance(notify, str) and notify.lower() in [ "f", "false", "n", "no" ]):
+ send_notification = False