From e0cf1f94fc9297b7451d10baeaf59c77d5d20e88 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:38:24 +0300 Subject: [PATCH] improve error handling for GAS response in workflow --- .github/workflows/version-check.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 041edee..84b79f3 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -88,11 +88,17 @@ jobs: '. + {buildType: $buildType, source: $source}') fi - response=$(curl -s -L -X POST "$g" -H "Content-Type: application/json" --data-raw "$final_json") + echo "Отправка данных на GAS..." - if echo "$response" | grep -q "text-align:center"; then - clean_response=$(echo "$response" | grep "text-align:center" | sed 's/<[^>]*>//g' | xargs) - echo "Ответ от GAS: $clean_response" + response=$(curl -s -L -X POST "$g" \ + -H "Content-Type: application/json" \ + --data-raw "$final_json") + + if echo "$response" | grep -q ""; then + echo "Ошибка: получен HTML вместо текстового ответа" + echo "Полученный HTML:" + echo "$response" + exit 1 else echo "Ответ от GAS: $response" - fi + fi \ No newline at end of file