Skip to content

Commit 6e5c7c0

Browse files
authored
fix transcription exception handling - /audio/transcriptions (#16791)
* fix transcription exception handling * reraise the exception
1 parent 5cb5c2a commit 6e5c7c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

litellm/proxy/proxy_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5483,6 +5483,7 @@ async def audio_transcriptions(
54835483
file_object = io.BytesIO(file_content)
54845484
file_object.name = file.filename
54855485
data["file"] = file_object
5486+
54865487
try:
54875488
### CALL HOOKS ### - modify incoming data / reject request before calling the model
54885489
data = await proxy_logging_obj.pre_call_hook(
@@ -5500,7 +5501,7 @@ async def audio_transcriptions(
55005501
)
55015502
response = await llm_call
55025503
except Exception as e:
5503-
raise HTTPException(status_code=500, detail=str(e))
5504+
raise e
55045505
finally:
55055506
file_object.close() # close the file read in by io library
55065507

0 commit comments

Comments
 (0)