From c09a4bc3350ff8e36ab69c49b6873cfcbe19b84b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 17 Mar 2025 10:41:02 +0100 Subject: [PATCH] api --- misc/api.func | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/api.func b/misc/api.func index 005fe36..52fdb9a 100644 --- a/misc/api.func +++ b/misc/api.func @@ -155,14 +155,17 @@ post_update_to_api() { local status="${1:-failed}" local exit_code="${2:-0}" local error_description="$(get_error_description "$exit_code")" - local API_URL="http://api.community-scripts.org/dev/upload/updatestatus" + local error="${exit_code}: ${error_description}" + + if [ -z "$error" ]; then + error="Unknown error" + fi JSON_PAYLOAD=$(cat <