Mintplex-Labs/anything-llm · error
response.sendStatus(500).end();
Error message
response.sendStatus(500).end();
What it means
Catch-all handler in the admin users-list endpoint: an exception was thrown while fetching users (or the multiUserMode check) and logged, and a bare 500 status is sent as the generic failure response.
Source
Thrown at server/endpoints/api/admin/index.js:81
schema: {
"$ref": "#/definitions/InvalidAPIKey"
}
}
#swagger.responses[401] = {
description: "Instance is not in Multi-User mode. Method denied",
}
*/
try {
if (!multiUserMode(response)) {
response.sendStatus(401).end();
return;
}
const users = await User.where();
response.status(200).json({ users });
} catch (e) {
console.error(e);
response.sendStatus(500).end();
}
});
app.post("/v1/admin/users/new", [validApiKey], async (request, response) => {
/*
#swagger.tags = ['Admin']
#swagger.description = 'Create a new user with username and password. Methods are disabled until multi user mode is enabled via the UI.'
#swagger.requestBody = {
description: 'Key pair object that will define the new user to add to the system.',
required: true,
content: {
"application/json": {
example: {
username: "sample-sam",
password: 'hunter2',
role: 'default | admin'
}
}View on GitHub (pinned to 3aec848f28)
Solutions
- Check the server console log for the exception printed just before this 500 response.
- Verify the database is reachable and migrations have run.
- Retry the request; if it persists, report the logged stack trace.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Admin endpoint hit an unexpected server error. Triggered when an unhandled exception occurs in the admin API handler, resulting in a bare 500 (api/admin/index.js:81).
Common situations: See trigger scenarios.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/f57be453c3d85f1f.
Report an issue: GitHub.