{"record":{"id":"0cc7a70afd1d1d15","repo":"koala73/worldmonitor","slug":"dashboard-unavailable-boundedtext-error-message","errorCode":null,"errorMessage":"Dashboard unavailable: ${boundedText(error.message, 160)} Reason: ${error.reason}.","messagePattern":"Dashboard unavailable: (.+?) Reason: (.+?)\\.","errorType":"exception","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":785,"sourceCode":"  successMetadata?: (\n    args: Record<string, unknown>,\n    result: unknown,\n  ) => Record<string, unknown>;\n}\n\nfunction withInvocationLogging(\n  name: WebMcpSpaToolName,\n  fn: (\n    input: Record<string, unknown>,\n    extra?: { signal?: AbortSignal },\n  ) => Promise<unknown> | unknown,\n  trackEvent: WebMcpAnalytics,\n  hooks: WebMcpInvocationHooks = {},\n): DashboardWebMcpTool['execute'] {\n  return async (args, extra?: WebMcpToolExecutionContext) => {\n    const signal = isAbortSignal(extra?.signal) ? extra.signal : undefined;\n    const execution = signal ? { signal } : undefined;\n    markLcpDebug('wm:webmcp:tool-start', {\n      tool: name,\n      targetCancellationSupported: Boolean(signal),\n    });\n    try {\n      throwIfWebMcpAborted(signal);\n      const preflightResult = await hooks.preflight?.(args, execution);\n      throwIfWebMcpAborted(signal);\n      let result: unknown;\n      if (preflightResult !== undefined) {\n        result = preflightResult;\n      } else if (CANCELLATION_REQUIRED_WEBMCP_TOOLS.has(name) && !signal) {\n        // This tool declared that a phantom completion would be unsafe, and\n        // the host cannot deliver the target-side signal. Return a structured\n        // denial because some hosts erase the name and message of errors\n        // raised by the page callback.\n        result = unsupportedCancellationResult();\n      } else {\n        result = await fn(args, execution);","sourceCodeStart":767,"sourceCodeEnd":803,"githubUrl":"https://github.com/koala73/worldmonitor/blob/e586b8b4b80f595aa7ece295eec10d76f2921240/src/services/webmcp.ts#L767-L803","documentation":"SafeWebMcpError thrown by the WebMCP tool wrapper when a dashboard dependency failed to initialize — the underlying DashboardBindingError's message (bounded to 160 chars) and reason are embedded. It signals the dashboard subsystem backing the tool is unavailable (e.g. bootstrap failure), not that the tool's arguments were wrong.","triggerScenarios":"Thrown at src/services/webmcp.ts:290 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded reason to identify which dashboard subsystem failed","Reload the dashboard so the binding can re-initialize","Retry after the underlying bootstrap/initialization issue is resolved"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e586b8b4b80f595aa7ece295eec10d76f2921240","analyzedAt":"2026-08-27T19:53:08.521Z","contentChangedAt":"2026-08-27T19:53:08.521Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}