fix(workflow): correct property usage in HTTP request node

This commit is contained in:
mengyonghao
2025-12-24 21:32:38 +08:00
parent 3993aa55ea
commit 68901e2642

View File

@@ -80,7 +80,7 @@ class HttpRequestNode(BaseNode):
self.typed_config.auth.header: api_key
}
case _:
raise RuntimeError(f"Auth type not supported: {self.typed_config.auth_type}")
raise RuntimeError(f"Auth type not supported: {self.typed_config.auth.auth_type}")
def _build_header(self, state: WorkflowState) -> dict[str, str]:
"""
@@ -142,7 +142,7 @@ class HttpRequestNode(BaseNode):
case HttpContentType.RAW:
content["content"] = self._render_template(self.typed_config.body.data, state)
case _:
raise RuntimeError(f"Content type not supported: {self.typed_config.content_type}")
raise RuntimeError(f"Content type not supported: {self.typed_config.body.content_type}")
return content
def _get_client_method(self, client: AsyncClient) -> Callable[..., Coroutine[Any, Any, Response]]: