paperclipai/paperclip · error
"path" is required and must be a non-empty string
Error message
"path" is required and must be a non-empty string
What it means
400 validation guard on POST .../local-folders/:folderKey/validate. Fires when req.body.path is missing, not a string, or an empty string; the folder validation endpoint requires a concrete path to probe against the declared folder contract.
Source
Thrown at server/src/routes/plugins.ts:2901
router.post("/plugins/:pluginId/companies/:companyId/local-folders/:folderKey/validate", async (req, res) => {
assertBoardOrgAccess(req);
const { pluginId, companyId, folderKey } = req.params;
assertCompanyAccess(req, companyId);
const plugin = await resolvePlugin(registry, pluginId);
if (!plugin) {
res.status(404).json({ error: "Plugin not found" });
return;
}
const body = req.body as {
path?: unknown;
access?: "read" | "readWrite";
requiredDirectories?: string[];
requiredFiles?: string[];
} | undefined;
if (typeof body?.path !== "string" || body.path.trim().length === 0) {
res.status(400).json({ error: '"path" is required and must be a non-empty string' });
return;
}
const declaration = requireLocalFolderDeclaration(plugin.manifestJson.localFolders ?? [], folderKey);
const status = await inspectPluginLocalFolder({
folderKey,
declaration,
overrideConfig: {
path: body.path,
},
});
res.json(status);
});
router.put("/plugins/:pluginId/companies/:companyId/local-folders/:folderKey", async (req, res) => {
assertBoardOrgAccess(req);
assertPluginManagementVisible();
const { pluginId, companyId, folderKey } = req.params;View on GitHub (pinned to a7e689b3c3)
Solutions
- Provide a non-empty string "path" in the request body.
- Ensure the JSON body is being sent with Content-Type: application/json so the path field is parsed.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/plugins.ts:2879 when the library encounters an invalid state.
Common situations: Validation error returned when a plugin file/path route is called without a valid "path" field in the request body.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/892f4816248af3e2.
Report an issue: GitHub.