Skip to content

Commit 67228c9

Browse files
authored
fix: url with variable not work (#12452)
1 parent fd2bfff commit 67228c9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api/core/workflow/nodes/http_request/executor.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ def __init__(
8282
node_data.authorization.config.api_key
8383
).text
8484

85-
# check if node_data.url is a valid URL
86-
if not node_data.url:
87-
raise InvalidURLError("url is required")
88-
if not node_data.url.startswith(("http://", "https://")):
89-
raise InvalidURLError("url should start with http:// or https://")
90-
9185
self.url: str = node_data.url
9286
self.method = node_data.method
9387
self.auth = node_data.authorization
@@ -114,6 +108,12 @@ def _initialize(self):
114108
def _init_url(self):
115109
self.url = self.variable_pool.convert_template(self.node_data.url).text
116110

111+
# check if url is a valid URL
112+
if not self.url:
113+
raise InvalidURLError("url is required")
114+
if not self.url.startswith(("http://", "https://")):
115+
raise InvalidURLError("url should start with http:// or https://")
116+
117117
def _init_params(self):
118118
"""
119119
Almost same as _init_headers(), difference:

0 commit comments

Comments
 (0)