different-ai/openwork · error

${message}

Error message

${message}

What it means

The generic failure exit of ensureDesktopLocalOpenworkConnection: after recording an inspector event ('route.local_openwork.ensure.error') with the failure message, it rethrows `new Error(message)`. It surfaces whatever specific reason (including the not-ready error above) prevented establishing the local OpenWork connection for the given route/workspace.

Source

Thrown at apps/app/src/react-app/shell/desktop-local-openwork.ts:206

    recordInspectorEvent("route.local_openwork.ensure.success", {
      route: options.route,
      workspaceId: workspace.id,
      workspaceRoot,
      baseUrl: info.baseUrl,
    });

    return info;
  } catch (error) {
    const message = describeError(error);
    console.error(`[${options.route}-route] local workspace reconnect failed`, error);
    recordInspectorEvent("route.local_openwork.ensure.error", {
      route: options.route,
      workspaceId: workspace.id,
      workspaceRoot,
      message,
    });
    throw new Error(message);
  }
}

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Read the recorded inspector event 'route.local_openwork.ensure.error' for the concrete underlying message.
  2. Fix the underlying cause (restart server / re-auth / fix workspace root) and retry.
  3. Wrap the call site to show a retry affordance rather than a dead end.

Example fix

// before
throw new Error(message);
// after — attach cause for easier diagnosis
throw new Error(message, { cause: underlyingError });
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await ensureDesktopLocalOpenworkConnection(options);
} catch (error) {
  setRouteError(error.message); // surface with retry action
  // diagnose via recorded inspector event 'route.local_openwork.ensure.error'
}

Prevention

When it happens

Trigger: Any inner failure of ensureDesktopLocalOpenworkConnection — server info not ready, missing token, workspaceRoot resolution failure — reaches this final throw and propagates to callers (useWorkspaceRouteState, handleCreateWorkspace, SettingsRouteContent).

Common situations: Same root causes as the underlying failure (slow/crashed local server, bad workspace state); users see the message verbatim in route or settings error surfaces.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/40b6f800c6178a86. Report an issue: GitHub.