ansible/awx

Improve Slack Notification Error Handling

開放

#1,048 建立於 2018年1月24日

 (2 則留言) (0 個反應) (0 位負責人)Python (3,333 個分叉)batch import
Hacktoberfestcomponent:apicomponent:uigood first issuetype:enhancement

倉庫指標

星標
 (13,071 顆星)
PR 合併指標
 (平均合併 24天 6小時) (30 天內合併 30 個 PR)

描述

ISSUE TYPE
  • Enhancement
COMPONENT NAME
  • API
  • UI
SUMMARY

Currently we only surface errors when sending slack notification if a Python exception occurs. We could do better if we read the event stream after our rtm_send_message call to see if there were any error events waiting.

A common error is when the bot has not been invited to a channel that we are attempting to send the notification to. This can be caught in the message stream, but does not throw an exception.

ADDITIONAL INFORMATION

https://github.com/ansible/awx/blob/devel/awx/main/notifications/slack_backend.py#L49

貢獻者指南