{"record":{"id":"8e36eb876fe06edf","repo":"paperclipai/paperclip","slug":"path-is-required","errorCode":null,"errorMessage":"path is required","messagePattern":"path is required","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/worker.ts","lineNumber":847,"sourceCode":"      return listPages(ctx, {\n        companyId,\n        wikiId: stringField(params.wikiId),\n        spaceSlug: stringField(params.spaceSlug),\n        pageType: stringField(params.pageType),\n        includeRaw: params.includeRaw === true || params.includeRaw === \"true\",\n        limit: typeof params.limit === \"number\" ? params.limit : null,\n      });\n    });\n\n    ctx.data.register(\"sources\", async (params) => {\n      const companyId = readCompanyIdFromParams(params);\n      return listSources(ctx, { companyId, wikiId: stringField(params.wikiId), spaceSlug: stringField(params.spaceSlug), limit: typeof params.limit === \"number\" ? params.limit : null });\n    });\n\n    ctx.data.register(\"page-content\", async (params) => {\n      const companyId = readCompanyIdFromParams(params);\n      const path = stringField(params.path);\n      if (!path) throw new Error(\"path is required\");\n      return readWikiPage(ctx, { companyId, wikiId: stringField(params.wikiId), spaceSlug: stringField(params.spaceSlug), path });\n    });\n\n    ctx.data.register(\"template\", async (params) => {\n      const companyId = readCompanyIdFromParams(params);\n      const path = stringField(params.path) ?? \"AGENTS.md\";\n      return readTemplate(ctx, { companyId, path });\n    });\n\n    ctx.data.register(\"operations\", async (params) => {\n      const companyId = readCompanyIdFromParams(params);\n      return listOperations(ctx, {\n        companyId,\n        wikiId: stringField(params.wikiId),\n        spaceSlug: stringField(params.spaceSlug),\n        operationType: stringField(params.operationType),\n        status: stringField(params.status),\n        limit: typeof params.limit === \"number\" ? params.limit : null,","sourceCodeStart":829,"sourceCodeEnd":865,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/packages/plugins/plugin-llm-wiki/src/worker.ts#L829-L865","documentation":"Thrown by the llm-wiki plugin's `page-content` data source (worker.ts:847) when `params.path` is missing or empty. Unlike the sibling `template` data source which defaults path to `\"AGENTS.md\"`, `page-content` requires an explicit wiki page path because there is no sensible default page to read.","triggerScenarios":"Querying the `page-content` data source without a `path` param, with an empty `path`, or after a caller mistakenly passes `pagePath`/`page` instead of `path`.","commonSituations":"A board card or agent fetches rendered wiki page content but builds the query from an object whose `path` field was undefined (e.g. a selected-page state that has not loaded yet), or a typo in the param key.","solutions":["Pass a non-empty `path` string identifying the wiki page (e.g. `\"spaces/engineering/pages/architecture.md\"`).","If you want the AGENTS.md template instead, query the `template` data source which defaults path to `\"AGENTS.md\"`.","Guard the data-source call site: only fetch page-content once a page selection (`path`) is known."],"exampleFix":"// before\nctx.data.fetch(\"page-content\", { companyId, wikiId });\n// after\nctx.data.fetch(\"page-content\", { companyId, wikiId, path: selectedPage.path });","handlingStrategy":"validation","validationCode":"function requirePagePath(params) {\n  const path = typeof params?.path === \"string\" ? params.path.trim() : \"\";\n  if (!path) throw new TypeError(\"page-content requires a non-empty 'path'\");\n  return path;\n}","typeGuard":"function hasWikiPath(p): p is { path: string } {\n  return typeof p?.path === \"string\" && p.path.trim().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Only fetch page-content after a page selection resolves.","Remember the sibling 'template' data source defaults path to AGENTS.md if you need a default.","Use the same param key the plugin expects: 'path'."],"tags":["plugin","llm-wiki","validation","param-validation","data-source"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}