1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

add debug info for failed slack notification

This commit is contained in:
Jim Ladd 2019-08-14 10:35:04 -07:00
parent 7bf250ecfa
commit 24c3903c30

View File

@ -55,7 +55,7 @@ class SlackBackend(AWXBaseEmailBackend):
if ret['ok']:
sent_messages += 1
else:
raise RuntimeError("Slack Notification unable to send {}: {}".format(r, m.subject))
raise RuntimeError("Slack Notification unable to send {}: {} ({})".format(r, m.subject, ret['error']))
except Exception as e:
logger.error(smart_text(_("Exception sending messages: {}").format(e)))
if not self.fail_silently: