Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error fix and logger message display of hello_webhook.py #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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