Skip to content

Commit

Permalink
fix(fastapi): http exception
Browse files Browse the repository at this point in the history
  • Loading branch information
windsnow1025 committed Oct 14, 2024
1 parent beb9ac6 commit 2c4f5cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fastapi/app/api/chat_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ async def generate(chat_request: ChatRequest, request: Request):
temperature=chat_request.temperature,
stream=chat_request.stream,
)
except HTTPException as e:
raise e
except Exception as e:
logging.exception(e)
raise HTTPException(status_code=500, detail=str(e))
Expand Down

0 comments on commit 2c4f5cf

Please sign in to comment.