404 for no such agent
This commit is contained in:
@@ -34,6 +34,7 @@ app.post("/api/chat/:agent_name", async (c) => {
|
|||||||
const agentName = c.req.param("agent_name");
|
const agentName = c.req.param("agent_name");
|
||||||
const agent = agentsByName[agentName];
|
const agent = agentsByName[agentName];
|
||||||
if (!agent) {
|
if (!agent) {
|
||||||
|
c.status(404);
|
||||||
return c.json({ error: `No such agent: ${agentName}` });
|
return c.json({ error: `No such agent: ${agentName}` });
|
||||||
}
|
}
|
||||||
console.log(input);
|
console.log(input);
|
||||||
|
|||||||
Reference in New Issue
Block a user