From 4922ced970847ad90a2e9a0d3b8fdaeb6fad0f4e Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Mon, 17 Aug 2026 23:02:12 +0200 Subject: [PATCH] Clear stale error detail on successful connector status --- runtime/sync.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/sync.sh b/runtime/sync.sh index 5f3471a..a761cf3 100644 --- a/runtime/sync.sh +++ b/runtime/sync.sh @@ -53,7 +53,11 @@ ERROR_DETAIL="" write_status() { local state="$1" message="$2" - python3 - "$STATUS_FILE" "$PUBLIC_STATUS_FILE" "$state" "$message" "$AUTH_MODE" "$API_STATE" "$API_MESSAGE" "$FALLBACK_STATE" "$FALLBACK_MESSAGE" "$ERROR_DETAIL" <<'PY' + local error_detail="$ERROR_DETAIL" + if [[ "$state" != "error" ]]; then + error_detail="" + fi + python3 - "$STATUS_FILE" "$PUBLIC_STATUS_FILE" "$state" "$message" "$AUTH_MODE" "$API_STATE" "$API_MESSAGE" "$FALLBACK_STATE" "$FALLBACK_MESSAGE" "$error_detail" <<'PY' import json, os, sys, tempfile, time (path, public_path, state, message, auth_mode, api_state, api_message, fallback_state, fallback_message, error_detail) = sys.argv[1:]