fix: In the api_request component, resolve UnboundLocalError 'redirection_history' when the request is abnormal (#7088)
Co-authored-by: zhubaoxiang2 <zhubaoxiang2@nsfocus.com>
This commit is contained in:
parent
fdaee4c40a
commit
e51e997494
1 changed files with 1 additions and 0 deletions
|
|
@ -389,6 +389,7 @@ class APIRequestComponent(Component):
|
||||||
|
|
||||||
# Process body using the new helper method
|
# Process body using the new helper method
|
||||||
processed_body = self._process_body(body)
|
processed_body = self._process_body(body)
|
||||||
|
redirection_history = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = await client.request(
|
response = await client.request(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue