mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-11 22:52:54 +00:00
Preserve HTTP errors from pipeline inlet filters
This commit is contained in:
parent
e3f3929198
commit
4bcb58b3eb
2 changed files with 3 additions and 1 deletions
|
|
@ -1893,6 +1893,8 @@ async def chat_completion(
|
|||
pass
|
||||
finally:
|
||||
raise # re-raise to ensure proper task cancellation handling
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
log.debug(f"Error processing chat payload: {e}")
|
||||
if metadata.get("chat_id") and metadata.get("message_id"):
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ async def process_pipeline_inlet_filter(request, payload, user, models):
|
|||
else {}
|
||||
)
|
||||
if "detail" in res:
|
||||
raise Exception(response.status, res["detail"])
|
||||
raise HTTPException(status_code=e.status, detail=res["detail"])
|
||||
except Exception as e:
|
||||
log.exception(f"Connection error: {e}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue