From 61c75eede01fdfefda00b71fd10c399d665bf34e Mon Sep 17 00:00:00 2001 From: Rudy Celekli Date: Wed, 7 Oct 2026 17:00:16 -0400 Subject: [PATCH] fix(backups): preserve failure messages in alert JSON Signed-off-by: Rudy Celekli --- support/support-infrastructure-maintainer.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/support/support-infrastructure-maintainer.md b/support/support-infrastructure-maintainer.md index 77508dc9..090da915 100644 --- a/support/support-infrastructure-maintainer.md +++ b/support/support-infrastructure-maintainer.md @@ -305,9 +305,11 @@ handle_error() { local error_message="$1" log "ERROR: $error_message" - # Send notification + # Encode the message as JSON data: backup paths can contain quotes or newlines. + local payload + payload=$(python3 -c 'import json, sys; print(json.dumps({"text": "🚨 Backup Failed: " + sys.argv[1]}))' "$error_message") curl -X POST -H 'Content-type: application/json' \ - --data "{\"text\":\"🚨 Backup Failed: $error_message\"}" \ + --data "$payload" \ "$NOTIFICATION_WEBHOOK" exit 1