{"record":{"id":"e4df8b4aa190f224","repo":"koala73/worldmonitor","slug":"no-digest-input-feeds-are-available","errorCode":null,"errorMessage":"No digest input feeds are available","messagePattern":"No digest input feeds are available","errorType":"exception","errorClass":"McpSourceUnavailableError","httpStatus":null,"severity":"error","filePath":"api/mcp/registry/analysis-tools.ts","lineNumber":181,"sourceCode":"      stale: evaluated.stale || unavailableInputs.length > 0,\n      unavailable_inputs: unavailableInputs,\n      failed_inputs: failedInputs,\n    },\n  };\n}\n\nconst ANALYSIS_CACHE_STATUS_PROPERTIES = {\n  unavailable_inputs: {\n    type: 'array',\n    items: { type: 'string' },\n    description: 'Required cache keys that were missing or unreadable; their contribution is not treated as quiet.',\n  },\n  failed_inputs: {\n    type: 'array',\n    items: { type: 'string' },\n    description: 'Subset of unavailable_inputs whose Redis read failed rather than returning a genuine miss.',\n  },\n} as const;\n\ntype AnalysisFreshness = Awaited<ReturnType<typeof readCachesWithFreshness>>['freshness'];\n\nfunction requireAnyInput(\n  payloads: unknown[],\n  freshness: AnalysisFreshness,\n  message: string,\n): void {\n  if (payloads.every((value) => value === null)) {\n    throw new McpSourceUnavailableError(\n      message,\n      freshness.unavailable_inputs,\n      freshness.failed_inputs,\n    );\n  }\n}\n\nfunction resolveLimit(raw: unknown, fallback: number): number {","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/koala73/worldmonitor/blob/7d06c8633d256c18e38133030bc3613976a96ec9/api/mcp/registry/analysis-tools.ts#L163-L199","documentation":"McpSourceUnavailableError thrown by requireAnyInput (api/mcp/registry/analysis-tools.ts:173) for digest-consuming analysis tools: every digest input feed payload was null, so no digest can be produced or analyzed. Carries unavailable_inputs and failed_inputs in typed fields; dispatch preserves them in JSON-RPC error.data.","triggerScenarios":"Calling a digest-based analysis tool while all digest input cache keys are null: news digest producer not publishing, keys expired, unseeded deployment, or Redis read failures.","commonSituations":"News digest cron/edge job failure. New variant or locale deployed before its digest producer ran. Upstash outage or eviction. Env mismatch between MCP edge and producer store.","solutions":["Use error.data to separate Redis failures (failed_inputs) from unseeded digests (unavailable_inputs)","Check digest key freshness (news:digest:...) on the health endpoint","Retry after the digest producer's next publish","Seed the digest keys or fix the producer if health reports them missing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const health = await fetch('https://<host>/api/health').then(r => r.json());\nconst digestReady = digestInputKeys.every(k => health?.datasets?.[k]?.fresh !== false);","typeGuard":"function isSourceUnavailable(e) {\n  return e?.name === 'McpSourceUnavailableError' || Array.isArray(e?.data?.unavailable_inputs);\n}","tryCatchPattern":"try {\n  await client.callTool(digestAnalysisTool, args);\n} catch (e) {\n  if (isSourceUnavailable(e)) {\n    return e.data?.failed_inputs?.length ? retryWithBackoff(call, 3) : retryAfter(digestProducerCadence);\n  }\n  throw e;\n}","preventionTips":["After deploying a new digest variant, wait for its first producer run before enabling the analysis tool for it","Monitor news:digest:* keys via health rather than discovering gaps through tool errors","Share one source-unavailable catch helper across all analysis tools to keep classification consistent"],"tags":["mcp","analysis","redis","data-source","digest"],"backgroundTag":"data-source-unavailable","analyzedSha":"7d06c8633d256c18e38133030bc3613976a96ec9","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}