forked from open-webui/open-webui
refac: openai error message
This commit is contained in:
parent
cbd18ec63c
commit
fa9593b4e8
1 changed files with 1 additions and 1 deletions
|
@ -341,7 +341,7 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
|
|||
try:
|
||||
res = r.json()
|
||||
if "error" in res:
|
||||
error_detail = f"External: {res['error']}"
|
||||
error_detail = f"External: {res['error']['message'] if 'message' in res['error'] else res['error']}"
|
||||
except:
|
||||
error_detail = f"External: {e}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue