paperclipai/paperclip · error · Error

workspaceId is required for update

Error message

workspaceId is required for update

What it means

The workspace update (patch) JSON command requires the positional workspaceId argument; it was missing, so the update has no target workspace.

Solutions

  1. Provide the workspaceId when updating a workspace.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/client/workspace.ts:279 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/08dce3ad99569f31. Report an issue: GitHub.

Appendix: source

Thrown at cli/src/commands/client/workspace.ts:279

          printOutput(result, { json: ctx.json });
        } catch (err) {
          handleCommandError(err);
        }
      }),
  );
}

function addProjectWorkspaceJson(parent: Command, name: string, description: string, method: "post" | "patch"): void {
  addCommonClientOptions(
    parent
      .command(name)
      .description(description)
      .argument("<projectId>", "Project ID")
      .argument("[workspaceId]", "Workspace ID for update")
      .requiredOption("--payload-json <json>", "JSON payload")
      .action(async (projectId: string, workspaceId: string | undefined, opts: JsonPayloadOptions) => {
        try {
          if (method === "patch" && !workspaceId) throw new Error("workspaceId is required for update");
          const ctx = resolveCommandContext(opts);
          const path = method === "post"
            ? apiPath`/api/projects/${projectId}/workspaces`
            : apiPath`/api/projects/${projectId}/workspaces/${workspaceId}`;
          const result = method === "post"
            ? await ctx.api.post(path, parseJson(opts.payloadJson))
            : await ctx.api.patch(path, parseJson(opts.payloadJson));
          printOutput(result, { json: ctx.json });
        } catch (err) {
          handleCommandError(err);
        }
      }),
  );
}

function addProjectRuntimeAction(parent: Command, name: string, description: string, actionResource: string): void {
  addCommonClientOptions(
    parent

View on GitHub (pinned to 120ae5428f)