Preserve HTTP errors from pipeline inlet filters

This commit is contained in:
snowak-homeoffice 2026-03-16 13:29:14 +01:00
parent e3f3929198
commit 4bcb58b3eb
2 changed files with 3 additions and 1 deletions

View file

@ -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"):

View file

@ -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}")