windmill-labs/windmill · error

pointerErrors.join("\n")

Error message

pointerErrors.join("\n")

What it means

windmill's `wmill sync push` collects per-item failures during a push and, after processing everything, throws a single Error whose message is all collected messages joined by newlines. This is an aggregate 'push finished with N failure(s)' report, not a single root cause. Each line corresponds to one remote item that could not be pushed.

Source

Thrown at cli/src/commands/sync/sync.ts:5449

        typeof parsed?.value === "string" &&
        parsed.value.startsWith("!inline_fileset ")
      ) {
        const serverPath =
          wsNameForPointerCheck && isWorkspaceSpecificFile(change.path)
            ? fromWorkspaceSpecificPath(change.path, wsNameForPointerCheck)
            : change.path;
        try {
          validateFilesetPointer(
            parsed.value.split(" ")[1],
            removeType(serverPath, "resource"),
          );
        } catch (e) {
          pointerErrors.push(e instanceof Error ? e.message : String(e));
        }
      }
    }
    if (pointerErrors.length > 0) {
      throw new Error(pointerErrors.join("\n"));
    }
  }

  // Handle JSON output for dry-run
  if (opts.dryRun && opts.jsonOutput) {
    const result = {
      success: true,
      changes: changes.map((change) => ({
        type: change.name,
        path: change.path,
        ...(change.name === "edited" && change.codebase
          ? { codebase_changed: true }
          : {}),
        ...(specificItems && isSpecificItem(change.path, specificItems)
          ? {
              workspace_specific: true,
              workspace_specific_path: getWorkspaceSpecificPath(
                change.path,

View on GitHub (pinned to e474e8803c)

Solutions

  1. Read each line of the message as a separate failure and fix them individually
  2. Re-run `wmill sync push` after fixing the first batch; the aggregate shrinks
  3. Use `wmill sync push --dry-run --json-output` to see the structured result before a real push
  4. Check workspace login/permissions (`wmill switch`, token expiry) if many items fail at once

Example fix

// before: treating the aggregate as one error
try { await wmill.sync.push(opts); } catch (e) { log.error(String(e)); }
// after: handle each line separately
try { await wmill.sync.push(opts); } catch (e) {
  for (const line of String(e.message).split("\n")) log.error(line);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// dry-run first to surface failures without side effects
const res = await wmill.sync.push({ ...opts, dryRun: true, jsonOutput: true });
if (res.errors?.length) console.warn(res.errors);

Try / catch

try {
  await wmill.sync.push(opts);
} catch (e) {
  const failures = String(e.message).split("\n");
  for (const f of failures) console.error("sync item failed:", f);
}

Prevention

When it happens

Trigger: Running `wmill sync push` (with or without --dry-run plumbing) when one or more individual item pushes throw — e.g. a remote API call fails for a script/flow/app — while the CLI is in the code path that pushes dependency pointers/related objects in a try/catch loop that appends to pointerErrors.

Common situations: Partial sync failures: stale local state referencing deleted remote objects, permission errors on specific items, renamed paths, or network blips mid-push. Developers see a multi-line error and often misread it as one bug when it is several.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/241060c9500949d5. Report an issue: GitHub.