Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/examples/orbit/webhook/hello_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ def webhook_listener() -> Response:
# Check if the incoming data contains a message specific to payload types
if data['type'] == "ACTION_COMPLETED":
message = data['data']
LOGGER.info("ACTION_COMPLETED: ", message)
LOGGER.info("ACTION_COMPLETED: %s", message)
elif data['type'] == "ACTION_COMPLETED_WITH_ALERT":
message = data['data']
LOGGER.info("ACTION_COMPETED_WITH_ALERT: ", message)
LOGGER.info("ACTION_COMPETED_WITH_ALERT: %s", message)
elif data['type'] == "TEST":
LOGGER.info("TEST", message)
message = data['data']
LOGGER.info("TEST: %s", message)
else:
# If the 'type' field is not recognized, return a 400 Bad Request
return jsonify({"error": "Unrecognized payload type"}), 400
Expand Down