fix: log expected fetch/transcript/tool-server failures as warnings (#24903)
This commit is contained in:
@@ -98,7 +98,7 @@ class YoutubeLoader:
|
||||
try:
|
||||
transcript_list = transcript_api.list(self.video_id)
|
||||
except Exception as e:
|
||||
log.exception('Loading YouTube transcript failed')
|
||||
log.warning(f'Loading YouTube transcript failed: {e}')
|
||||
return []
|
||||
|
||||
# Try each language in order of priority
|
||||
|
||||
@@ -272,7 +272,7 @@ async def fetch_url(
|
||||
|
||||
return content
|
||||
except Exception as e:
|
||||
log.exception(f'fetch_url error: {e}')
|
||||
log.warning(f'fetch_url error: {e}')
|
||||
return json.dumps({'error': str(e)})
|
||||
|
||||
|
||||
|
||||
@@ -1513,7 +1513,7 @@ async def execute_tool_server(
|
||||
|
||||
except Exception as err:
|
||||
error = str(err)
|
||||
log.exception(f'API Request Error: {error}')
|
||||
log.warning(f'API Request Error: {error}')
|
||||
return ({'error': error}, None)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user