We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 336b5ad commit c4fa9f4Copy full SHA for c4fa9f4
app/api/v1/routes/webhooks.py
@@ -79,7 +79,9 @@ def handle_webhook(
79
):
80
webhook_payload = webhook_result.payload
81
webhook_payload.channel = webhook["channel"]["S"]
82
- hook_type = webhook["hook_type"]["S"]
+ hook_type = webhook.get("hook_type", {}).get(
83
+ "S", "alert"
84
+ ) # Default to "alert" if hook_type is missing
85
if hook_type == "alert":
86
webhook_payload = append_incident_buttons(webhook_payload, webhook_id)
87
0 commit comments