diff --git a/do_function/monitor_snapshots/packages/monitor-snapshot/main/__main__.py b/do_function/monitor_snapshots/packages/monitor-snapshot/main/__main__.py index 9ec6c8f0b..1205aa930 100644 --- a/do_function/monitor_snapshots/packages/monitor-snapshot/main/__main__.py +++ b/do_function/monitor_snapshots/packages/monitor-snapshot/main/__main__.py @@ -25,9 +25,6 @@ def slack_alert(message, thread_ts=None): client = WebClient(token=os.environ['SLACK_TOKEN']) CHANNEL_NAME = '#forest-notifications' - # Format message as a JSON-like string for better readability. - message = f'```{json.dumps(message, indent=4, ensure_ascii=False)}```' - # Try sending message, catch and print any errors. try: response = client.chat_postMessage(channel=CHANNEL_NAME, text=message, thread_ts=thread_ts) @@ -141,7 +138,7 @@ def main(): if not checks_passed: thread = slack_alert("⛔ Snapshot check failed. 🔥🌲🔥") for error_message in error_messages: - slack_alert({"error": error_message}, thread_ts=thread) + slack_alert(error_message, thread_ts=thread) return { "result": "⛔ failure", "message": "Some checks did not pass. Please review the issues reported. Let's fix them and keep the forest green!. 🔥🌲🔥"