paperclipai/paperclip · error
File path is required
Error message
File path is required
What it means
Error "File path is required" thrown in paperclipai/paperclip.
Source
Thrown at server/src/routes/plugin-ui-static.ts:242
* The wildcard captures the relative file path within the UI directory.
*
* Cache strategy:
* - Content-hashed filenames → immutable, 1-year max-age
* - Other files → must-revalidate with ETag
*/
router.get("/_plugins/:pluginId/ui/*filePath", async (req, res) => {
const { pluginId } = req.params;
// Extract the relative file path from the named wildcard.
// In Express 5 with path-to-regexp v8, named wildcards may return
// an array of path segments or a single string.
const rawParam = req.params.filePath;
const rawFilePath = Array.isArray(rawParam)
? rawParam.join("/")
: rawParam as string | undefined;
if (!rawFilePath || rawFilePath.length === 0) {
res.status(400).json({ error: "File path is required" });
return;
}
// Step 1: Look up the plugin
let plugin = null;
try {
plugin = await registry.getById(pluginId);
} catch (error) {
const maybeCode =
typeof error === "object" && error !== null && "code" in error
? (error as { code?: unknown }).code
: undefined;
if (maybeCode !== "22P02") {
throw error;
}
}
if (!plugin) {
plugin = await registry.getByKey(pluginId);View on GitHub (pinned to 120ae5428f)
Solutions
- Include the required field(s) in the request path, query, or body as named by the error message, then retry.
- Check the API contract in packages/shared validators for the exact required shape of this endpoint.
When it happens
Trigger: Thrown at server/src/routes/plugin-ui-static.ts:242 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/982350b458f0c207.
Report an issue: GitHub.