{"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":777,"sourceCode":"        tool: name,\n        ...invocation,\n        ...(hooks.successMetadata?.(args, result) ?? {}),\n      });\n      return result;\n    } catch (error) {\n      const reason = signal?.aborted\n        ? 'cancelled'\n        : classifyInvocationError(error);\n      reportWebMcpEvent(trackEvent, 'webmcp-tool-invoked', {\n        tool: name,\n        outcome: 'failure',\n        reason,\n      });\n      if (signal?.aborted) throwIfWebMcpAborted(signal);\n      if (error instanceof SafeWebMcpError) throw error;\n      if (isWebMcpAbortError(error)) throw error;\n      if (error instanceof DashboardBindingError) {\n        throw new SafeWebMcpError(\n          `Dashboard unavailable: ${boundedText(error.message, 160)} Reason: ${error.reason}.`,\n          'unavailable',\n        );\n      }\n      if (error instanceof DashboardPanelCatalogError) {\n        throw new SafeWebMcpError(error.message, 'validation');\n      }\n      if (error instanceof MissionPresetCatalogError) {\n        throw new SafeWebMcpError(error.message, 'validation');\n      }\n      throw new SafeWebMcpError(TOOL_FAILURE_MESSAGES[name]);\n    }\n  };\n}\n\nfunction enforceOutputBudget(value: unknown): void {\n  const serialized = JSON.stringify(value);\n  if (typeof serialized !== 'string' || serialized.length > MAX_OUTPUT_CHARS) {","sourceCodeStart":759,"sourceCodeEnd":795,"githubUrl":"https://github.com/koala73/worldmonitor/blob/9361220cc013571781071f0206e4d80fd14b2f7f/src/services/webmcp.ts#L759-L795","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":"9361220cc013571781071f0206e4d80fd14b2f7f","analyzedAt":"2026-08-27T19:53:08.521Z","contentChangedAt":"2026-08-27T19:53:08.521Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}