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:
zhubaoxiang 2025-03-16 17:10:38 +08:00 committed by GitHub
commit e51e997494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -389,6 +389,7 @@ class APIRequestComponent(Component):
# Process body using the new helper method
processed_body = self._process_body(body)
redirection_history = []
try:
response = await client.request(