v1.1.26: handle empty validate-cfs response (JSONDecodeError)
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ from routes.api import bp as api_bp
|
|||||||
from routes.api_test import bp as api_test_bp
|
from routes.api_test import bp as api_test_bp
|
||||||
|
|
||||||
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
|
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
|
||||||
VERSION = "1.1.25"
|
VERSION = "1.1.26"
|
||||||
|
|
||||||
app = Flask(__name__, template_folder="templates", static_folder="static")
|
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||||||
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
|
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
|
||||||
|
|||||||
@@ -345,8 +345,14 @@ def _send_params_terraform(client, op_uid, params):
|
|||||||
"svcOperationCfsParamId": pid,
|
"svcOperationCfsParamId": pid,
|
||||||
"paramValue": val
|
"paramValue": val
|
||||||
})
|
})
|
||||||
# Шаг 7: validate-cfs (ошибка НЕ глотается — возвращается вызывающему)
|
# Шаг 7: validate-cfs (пустой ответ = успех)
|
||||||
|
try:
|
||||||
client.get(f"/instanceOperations/{op_uid}/validate-cfs")
|
client.get(f"/instanceOperations/{op_uid}/validate-cfs")
|
||||||
|
except Exception as e:
|
||||||
|
if "Expecting value" in str(e) or "JSON" in str(type(e).__name__):
|
||||||
|
pass # пустой ответ = OK
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
def _cleanup_op_results():
|
def _cleanup_op_results():
|
||||||
|
|||||||
Reference in New Issue
Block a user