{"record":{"id":"ddd498af80de8855","repo":"mastra-ai/mastra","slug":"registry-with-id-registryid-not-found","errorCode":null,"errorMessage":"Registry with ID \"${registryId}\" not found.","messagePattern":"Registry with ID \"(.+?)\" not found\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/mcp-registry-registry/src/registry/fetch-servers.ts","lineNumber":13,"sourceCode":"import { registryData } from './registry';\nimport type { ServerEntry } from './types';\n\n/**\n * Fetches servers from a registry's servers_url endpoint\n */\nexport async function fetchServersFromRegistry(registryId: string): Promise<ServerEntry[]> {\n  try {\n    // Find the registry in our registry data\n    const registry = registryData.registries.find(r => r.id === registryId);\n\n    if (!registry) {\n      throw new Error(`Registry with ID \"${registryId}\" not found.`);\n    }\n\n    if (!registry.servers_url) {\n      throw new Error(`Registry \"${registry.name}\" does not have a servers endpoint.`);\n    }\n\n    console.info(`Fetching servers from ${registry.name} at ${registry.servers_url}`);\n\n    // Fetch the servers from the registry's servers_url\n    const response = await fetch(registry.servers_url);\n\n    if (!response.ok) {\n      throw new Error(`Failed to fetch servers from ${registry.servers_url}: ${response.statusText}`);\n    }\n\n    const data = (await response.json()) as unknown;\n\n    // If the registry has a custom post-processing function, use it","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/mcp-registry-registry/src/registry/fetch-servers.ts#L1-L31","documentation":"fetchServersFromRegistry looks up a registry by ID in the bundled registryData. If no registry entry has that ID, it throws 'Registry with ID \"<id>\" not found.' — the caller referenced a registry that is not present in the registry data.","triggerScenarios":"Calling the servers tool (via fetchServersFromRegistry) with a registryId that does not exist in registryData.registries — misspelled ID, deleted/renamed registry, or querying an external registry that is not in the bundled data.","commonSituations":"Agents guessing registry IDs; registry data updated/renamed between package versions so old IDs no longer resolve; copy-paste of a registry name instead of its ID.","solutions":["List available registries from registryData.registries and use an exact, existing ID.","Fix typos and use the ID (not the registry name).","If the registry existed in an older version, check the package changelog for renames/removals and update the ID."],"exampleFix":"// before\nawait fetchServersFromRegistry('Mastra Registry');\n// after\nawait fetchServersFromRegistry('mastra'); // exact registry ID from registryData","handlingStrategy":"validation","validationCode":"import { registryData } from './registry-data';\nconst validIds = registryData.registries.map(r => r.id);\nif (!validIds.includes(registryId)) {\n  throw new Error(`Unknown registryId \"${registryId}\". Available: ${validIds.join(', ')}`);\n}\nawait fetchServersFromRegistry(registryId);","typeGuard":null,"tryCatchPattern":"try {\n  const servers = await fetchServersFromRegistry(registryId);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Registry with ID')) {\n    // list valid registry IDs for the caller instead of failing hard\n  } else throw e;\n}","preventionTips":["Enumerate registry IDs from registryData before querying; never guess IDs.","Use the registry ID, not its display name.","Re-check valid IDs after upgrading the mcp-registry package."],"tags":["not-found","input-validation","registry"],"backgroundTag":"resource-not-found","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}