From fde3fe0ab6466f21398063b42d1cfa1acf75c320 Mon Sep 17 00:00:00 2001 From: Novice Lee Date: Fri, 20 Dec 2024 13:15:44 +0800 Subject: [PATCH] fix: reformat the http node file --- api/core/workflow/nodes/http_request/node.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/api/core/workflow/nodes/http_request/node.py b/api/core/workflow/nodes/http_request/node.py index 4b21b7ef70..171389a34c 100644 --- a/api/core/workflow/nodes/http_request/node.py +++ b/api/core/workflow/nodes/http_request/node.py @@ -62,14 +62,11 @@ class HttpRequestNode(BaseNode[HttpRequestNodeData]): def _run(self) -> NodeRunResult: process_data = {} try: - executor_config = { - "node_data": self.node_data, - "timeout": self._get_request_timeout(self.node_data), - "variable_pool": self.graph_runtime_state.variable_pool, - } - executor_config["max_retries"] = 0 http_executor = Executor( - **executor_config, + node_data=self.node_data, + timeout=self._get_request_timeout(self.node_data), + variable_pool=self.graph_runtime_state.variable_pool, + max_retries=0, ) process_data["request"] = http_executor.to_log() @@ -87,7 +84,7 @@ class HttpRequestNode(BaseNode[HttpRequestNodeData]): process_data={ "request": http_executor.to_log(), }, - error=f"Request failed with status code {response.status_code}\nRaw response:{response.text}", + error=f"Request failed with status code {response.status_code}", error_type="HTTPResponseCodeError", ) return NodeRunResult(