From 64f91b83e40f5471460d0ba62d5ec0f7126ec375 Mon Sep 17 00:00:00 2001 From: Josef Kudera <46950237+kudj@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:01:22 +0200 Subject: [PATCH 1/2] catch exception and return in expected format --- python-sync-actions/src/component.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/python-sync-actions/src/component.py b/python-sync-actions/src/component.py index e1b92c3..c2c3c9b 100644 --- a/python-sync-actions/src/component.py +++ b/python-sync-actions/src/component.py @@ -631,7 +631,25 @@ def perform_function_sync(self) -> dict: @sync_action("test_request") @sync_action_exception_handler def test_request(self): - results, response, log, error_message = self.make_call() + try: + results, response, log, error_message = self.make_call() + except Exception as e: + return { + "response": { + "status_code": None, + "reason": f"Configuration Error: {repr(e)}", + "data": None, + "headers": {}, + }, + "request": { + "url": None, + "method": None, + "data": None, + "headers": {}, + }, + "records": [], + "debug_log": f"Error during configuration/initialization: {repr(e)}", + } body = None if response.request.body: From c65b3d640c1caf836fc035f175c6e7cf352e3e8e Mon Sep 17 00:00:00 2001 From: Josef Kudera <46950237+kudj@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:19:01 +0200 Subject: [PATCH 2/2] fix filling user parameters --- python-sync-actions/src/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-sync-actions/src/configuration.py b/python-sync-actions/src/configuration.py index c2902c1..d2081ab 100644 --- a/python-sync-actions/src/configuration.py +++ b/python-sync-actions/src/configuration.py @@ -337,7 +337,7 @@ def build_api_request(configuration: dict) -> List[Tuple[ApiRequest, RequestCont method = endpoint_config.get("method", "GET") # evaluate functions inside the params - user_parameters = configuration.get("parameters", {}).get("config", {}) + user_parameters = configuration.get("config", {}) params = endpoint_config.get("params", {}) params = ConfigHelpers().fill_in_user_parameters(params, user_parameters, evaluate_conf_objects_functions=True) request_content = build_request_content(method, params)