Skip to content

Commit 96659c9

Browse files
committed
return 400 error if pipeline not specified and no default pipeline found
1 parent c9c2c41 commit 96659c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

papercast/server.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ async def _add(
4343
elif "default" in self._pipelines.keys():
4444
pipeline = self._get_pipeline("default")
4545
else:
46-
return {"message": "Pipeline not specified and no default pipeline found"}
46+
raise HTTPException(
47+
status_code=400,
48+
detail="Pipeline not specified and no default pipeline found",
49+
)
4750

4851
loop = asyncio.get_running_loop()
4952

0 commit comments

Comments
 (0)