paperclipai/paperclip · error

Invalid project workspace payload

Error message

Invalid project workspace payload

What it means

Error "Invalid project workspace payload" thrown in paperclipai/paperclip.

Source

Thrown at server/src/routes/projects.ts:236

    res.json(summary);
  });

  router.post("/companies/:companyId/projects", validate(createProjectSchema), async (req, res) => {
    const companyId = req.params.companyId as string;
    assertCompanyAccess(req, companyId);
    type CreateProjectPayload = Parameters<typeof svc.create>[1] & {
      workspace?: Parameters<typeof svc.createWorkspace>[1];
      repositoryIds?: string[];
    };

    const { workspace, repositoryIds, ...projectData } = req.body as CreateProjectPayload;
    await assertProjectEnvironmentSelection(
      companyId,
      readProjectPolicyEnvironmentId(projectData.executionWorkspacePolicy),
    );
    assertNoAgentHostWorkspaceCommandMutation(
      req,
      [
        ...collectProjectExecutionWorkspaceCommandPaths(projectData.executionWorkspacePolicy),
        ...collectProjectWorkspaceCommandPaths(workspace, "workspace"),
      ],
    );
    await assertNoManagedSandboxWorkspacePath(workspace);
    if (projectData.env !== undefined) {
      projectData.env = await secretsSvc.normalizeEnvBindingsForPersistence(
        companyId,
        projectData.env,
        { strictMode: strictSecretsMode, fieldPath: "env" },
      );
    }
    if (workspace && repositoryIds) throw unprocessable("Use either workspace or repositoryIds when creating a project");
    const repositories = repositoryIds ? await selectedRepositories(req, companyId, repositoryIds) : null;
    const project = repositories ? await svc.createWithRepositories(companyId, projectData, repositories) : await svc.create(companyId, projectData);
    if (project.env) {
      await secretsSvc.syncEnvBindingsForTarget?.(
        companyId,

View on GitHub (pinned to 01ad858492)

Solutions

  1. Send a valid JSON body matching the project workspace payload schema.
  2. Check required fields and their types in the workspace payload against the API contract.

When it happens

Trigger: Thrown at server/src/routes/projects.ts:192 when the library encounters an invalid state.

Common situations: Validation error returned when the project workspace create/update payload fails schema validation.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/e56033daa0cdb1c2. Report an issue: GitHub.