{"record":{"id":"7a00e2b75c576c61","repo":"paperclipai/paperclip","slug":"projectid-is-required-for-project-workspace-diffs","errorCode":null,"errorMessage":"projectId is required for project workspace diffs","messagePattern":"projectId is required for project workspace diffs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-workspace-diff/src/worker.ts","lineNumber":60,"sourceCode":"    : null;\n}\n\nconst plugin = definePlugin({\n  async setup(ctx) {\n    ctx.logger.info(`${PLUGIN_NAME} plugin setup`);\n    const workspaceDiff = workspaceDiffService();\n\n    ctx.data.register(\"workspace-diff\", async (params: Record<string, unknown>) => {\n      const workspaceId = readString(params.workspaceId);\n      const companyId = readString(params.companyId);\n      if (!workspaceId || !companyId) {\n        throw new Error(\"workspaceId and companyId are required\");\n      }\n\n      if (params.entityType === \"project_workspace\") {\n        const projectId = readString(params.projectId);\n        if (!projectId) {\n          throw new Error(\"projectId is required for project workspace diffs\");\n        }\n        const workspaces = await ctx.projects.listWorkspaces(projectId, companyId);\n        const workspace = workspaces.find((candidate) => candidate.id === workspaceId);\n        if (!workspace) {\n          throw new Error(\"Workspace not found\");\n        }\n        return workspaceDiff.getDiff({\n          id: workspace.id,\n          companyId,\n          cwd: workspace.path,\n          baseRef: resolveDefaultBaseRef({\n            projectWorkspaceDefaultRef: workspace.defaultRef,\n            projectWorkspaceRepoRef: workspace.repoRef,\n          }),\n        }, workspaceDiffQuerySchema.parse(params));\n      }\n\n      const workspace = await ctx.executionWorkspaces.get(workspaceId, companyId);","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/plugins/plugin-workspace-diff/src/worker.ts#L42-L78","documentation":"Error \"projectId is required for project workspace diffs\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-workspace-diff/src/worker.ts:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass projectId when requesting a project workspace diff."],"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-23T08:17:48.524Z"}