"tasks/git@developer.sourcefind.cn:sugon_wxj/megatron-lm.git" did not exist on "5aa3d5e3495f5825f13abd3ac7f7db7d72c44713"
Commit 1e038717 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix: openai issue

parent f90236f5
......@@ -144,7 +144,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
except:
error_detail = f"External: {e}"
raise HTTPException(status_code=r.status_code, detail=error_detail)
raise HTTPException(
status_code=r.status_code if r else 500, detail=error_detail
)
except ValueError:
raise HTTPException(status_code=401, detail=ERROR_MESSAGES.OPENAI_NOT_FOUND)
......@@ -328,4 +330,6 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
except:
error_detail = f"External: {e}"
raise HTTPException(status_code=r.status_code, detail=error_detail)
raise HTTPException(
status_code=r.status_code if r else 500, detail=error_detail
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment