mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix: apply mask_sensitive_info to async streaming error body
Addresses Greptile review — the async streaming path was missing mask_sensitive_info() on the response body, while the sync path had it.
This commit is contained in:
parent
25f93bed91
commit
74f55b0671
1 changed files with 1 additions and 1 deletions
|
|
@ -352,7 +352,7 @@ def _raise_masked_sync_error(e: httpx.HTTPStatusError, stream: bool) -> None:
|
|||
async def _raise_masked_async_error(e: httpx.HTTPStatusError, stream: bool) -> None:
|
||||
"""Raise a MaskedHTTPStatusError for async HTTP handlers."""
|
||||
if stream:
|
||||
_body = await _safe_aread_response(e.response)
|
||||
_body = mask_sensitive_info(await _safe_aread_response(e.response))
|
||||
raise MaskedHTTPStatusError(e, message=_body, text=_body) from None
|
||||
_text = mask_sensitive_info(_safe_get_response_text(e.response))
|
||||
raise MaskedHTTPStatusError(e, message=_text, text=_text) from None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue