Mintplex-Labs/anything-llm · error
Message is required
Error message
Message is required
What it means
Validation guard in the mobile stream-chat command handler: the command payload lacks a message field, so there is no user prompt to stream a chat response for and the command is rejected with the required-field error.
Source
Thrown at server/endpoints/mobile/utils/index.js:150
if (command === "new-thread") {
const { workspaceSlug } = body;
const workspace = user
? await Workspace.getWithUser(user, { slug: String(workspaceSlug) })
: await Workspace.get({ slug: String(workspaceSlug) });
if (!workspace)
return response.status(400).json({ error: "Workspace not found" });
const { thread } = await WorkspaceThread.new(workspace, user?.id);
return response.status(200).json({ thread });
}
if (command === "stream-chat") {
const { workspaceSlug = null, threadSlug = null, message } = body;
if (!workspaceSlug)
return response.status(400).json({ error: "Workspace ID is required" });
else if (!message)
return response.status(400).json({ error: "Message is required" });
const workspace = user
? await Workspace.getWithUser(user, { slug: String(workspaceSlug) })
: await Workspace.get({ slug: String(workspaceSlug) });
if (!workspace)
return response.status(400).json({ error: "Workspace not found" });
const thread = threadSlug
? await prisma.workspace_threads.findFirst({
where: {
workspace_id: workspace.id,
slug: String(threadSlug),
...(user ? { user_id: user.id } : {}),
},
})
: null;
response.setHeader("Cache-Control", "no-cache");View on GitHub (pinned to 20f6d3546c)
Solutions
- Include a non-empty message in the request.
- Check the client is serializing the message body correctly.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/endpoints/mobile/utils/index.js:146 when the library encounters an invalid state.
Common situations: Sending a chat/command request from mobile without a message body.
AI-assisted analysis of Mintplex-Labs/anything-llm@20f6d3546c (2026-08-18).
Data as JSON: /api/errors/049a9ccd281d0bc3.
Report an issue: GitHub.