feat: log provider errors to console for better insights (#23379)
* fix: log provider errors that were silently swallowed * Update main.py * fix: wrap non-JSON SSE error responses in JSON so middleware handles them
This commit is contained in:
@@ -1797,7 +1797,7 @@ async def chat_completion(
|
||||
finally:
|
||||
raise # re-raise to ensure proper task cancellation handling
|
||||
except Exception as e:
|
||||
log.debug(f'Error processing chat payload: {e}')
|
||||
log.error('Error processing chat payload: %s', e)
|
||||
if metadata.get('chat_id') and metadata.get('message_id'):
|
||||
# Update the chat message with the error
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user