fix(fastapi): yield SSEErrorResponse on outline parse instead of raising
This commit is contained in:
parent
7aa168ac5b
commit
c6ca4fe8a7
1 changed files with 4 additions and 4 deletions
|
|
@ -89,10 +89,10 @@ async def stream_outlines(
|
|||
)
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Failed to generate presentation outlines. Please try again.",
|
||||
)
|
||||
yield SSEErrorResponse(
|
||||
detail=f"Failed to generate presentation outlines. Please try again. {str(e)}",
|
||||
).to_string()
|
||||
return
|
||||
|
||||
presentation_outlines = PresentationOutlineModel(**presentation_outlines_json)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue