forked from phoenix/litellm-mirror
fix(utils.py): exception mapping on 'next()' streaming error
This commit is contained in:
parent
109cd93a39
commit
41fb76740e
1 changed files with 8 additions and 1 deletions
|
@ -9704,7 +9704,14 @@ class CustomStreamWrapper:
|
||||||
threading.Thread(
|
threading.Thread(
|
||||||
target=self.logging_obj.failure_handler, args=(e, traceback_exception)
|
target=self.logging_obj.failure_handler, args=(e, traceback_exception)
|
||||||
).start()
|
).start()
|
||||||
raise e
|
if isinstance(e, OpenAIError):
|
||||||
|
raise e
|
||||||
|
else:
|
||||||
|
raise exception_type(
|
||||||
|
model=self.model,
|
||||||
|
original_exception=e,
|
||||||
|
custom_llm_provider=self.custom_llm_provider,
|
||||||
|
)
|
||||||
|
|
||||||
async def __anext__(self):
|
async def __anext__(self):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue