mirror of
https://github.com/open-webui/open-webui
synced 2024-11-17 05:53:11 +00:00
refac: openai error message
This commit is contained in:
parent
cbd18ec63c
commit
fa9593b4e8
@ -341,7 +341,7 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
|
|||||||
try:
|
try:
|
||||||
res = r.json()
|
res = r.json()
|
||||||
if "error" in res:
|
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:
|
except:
|
||||||
error_detail = f"External: {e}"
|
error_detail = f"External: {e}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user