{"record":{"id":"982350b458f0c207","repo":"paperclipai/paperclip","slug":"file-path-is-required","errorCode":null,"errorMessage":"File path is required","messagePattern":"File path is required","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/plugin-ui-static.ts","lineNumber":242,"sourceCode":"   * The wildcard captures the relative file path within the UI directory.\n   *\n   * Cache strategy:\n   * - Content-hashed filenames → immutable, 1-year max-age\n   * - Other files → must-revalidate with ETag\n   */\n  router.get(\"/_plugins/:pluginId/ui/*filePath\", async (req, res) => {\n    const { pluginId } = req.params;\n\n    // Extract the relative file path from the named wildcard.\n    // In Express 5 with path-to-regexp v8, named wildcards may return\n    // an array of path segments or a single string.\n    const rawParam = req.params.filePath;\n    const rawFilePath = Array.isArray(rawParam)\n      ? rawParam.join(\"/\")\n      : rawParam as string | undefined;\n\n    if (!rawFilePath || rawFilePath.length === 0) {\n      res.status(400).json({ error: \"File path is required\" });\n      return;\n    }\n\n    // Step 1: Look up the plugin\n    let plugin = null;\n    try {\n      plugin = await registry.getById(pluginId);\n    } catch (error) {\n      const maybeCode =\n        typeof error === \"object\" && error !== null && \"code\" in error\n          ? (error as { code?: unknown }).code\n          : undefined;\n      if (maybeCode !== \"22P02\") {\n        throw error;\n      }\n    }\n    if (!plugin) {\n      plugin = await registry.getByKey(pluginId);","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/routes/plugin-ui-static.ts#L224-L260","documentation":"Error \"File path is required\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/plugin-ui-static.ts:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}