fix: reformat the http node file
This commit is contained in:
parent
07528f82b9
commit
fde3fe0ab6
@ -62,14 +62,11 @@ class HttpRequestNode(BaseNode[HttpRequestNodeData]):
|
|||||||
def _run(self) -> NodeRunResult:
|
def _run(self) -> NodeRunResult:
|
||||||
process_data = {}
|
process_data = {}
|
||||||
try:
|
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(
|
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()
|
process_data["request"] = http_executor.to_log()
|
||||||
|
|
||||||
@ -87,7 +84,7 @@ class HttpRequestNode(BaseNode[HttpRequestNodeData]):
|
|||||||
process_data={
|
process_data={
|
||||||
"request": http_executor.to_log(),
|
"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",
|
error_type="HTTPResponseCodeError",
|
||||||
)
|
)
|
||||||
return NodeRunResult(
|
return NodeRunResult(
|
||||||
|
Loading…
Reference in New Issue
Block a user