{"record":{"id":"db11652a6ed0e52f","repo":"can1357/oh-my-pi","slug":"marketplace-name-not-found","errorCode":null,"errorMessage":"Marketplace \"${name}\" not found","messagePattern":"Marketplace \"(.+?)\" not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts","lineNumber":155,"sourceCode":"\tasync removeMarketplace(name: string): Promise<void> {\n\t\tconst reg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);\n\t\t// removeMarketplaceEntry throws if not found — propagate to caller.\n\t\tconst updated = removeMarketplaceEntry(reg, name);\n\t\tawait writeMarketplacesRegistry(this.#opts.marketplacesRegistryPath, updated);\n\n\t\tawait fs.rm(path.join(this.#opts.marketplacesCacheDir, name), {\n\t\t\trecursive: true,\n\t\t\tforce: true,\n\t\t});\n\n\t\tlogger.debug(\"Marketplace removed\", { name });\n\t}\n\n\tasync updateMarketplace(name: string): Promise<MarketplaceRegistryEntry> {\n\t\tconst reg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);\n\t\tconst existing = getMarketplaceEntry(reg, name);\n\t\tif (!existing) {\n\t\t\tthrow new Error(`Marketplace \"${name}\" not found`);\n\t\t}\n\n\t\tconst { catalog, clonePath } = await fetchMarketplace(existing.sourceUri, this.#opts.marketplacesCacheDir);\n\n\t\t// Guard against upstream catalog silently renaming itself — the registry\n\t\t// entry is keyed by name, so a drift would corrupt the entry on next read.\n\t\tif (catalog.name !== name) {\n\t\t\tif (clonePath) {\n\t\t\t\tawait fs.rm(clonePath, { recursive: true, force: true }).catch(() => {});\n\t\t\t}\n\t\t\tthrow new Error(\n\t\t\t\t`Marketplace catalog name changed from \"${name}\" to \"${catalog.name}\". ` +\n\t\t\t\t\t`Remove and re-add the marketplace to update.`,\n\t\t\t);\n\t\t}\n\n\t\t// Promote the temp clone to its final cache location now that drift check passed.\n\t\tif (clonePath) {","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts#L137-L173","documentation":"updateMarketplace looks up the named marketplace in the registry and throws this when no entry matches. The registry is keyed by marketplace name, so updating requires the exact registered name. Nothing is fetched; this is a pure registry lookup failure.","triggerScenarios":"MarketplaceManager.updateMarketplace(name) called with a name not present in the marketplaces registry — typo, wrong casing, marketplace was removed, or it was never added.","commonSituations":"Typing \"MyMarket\" when it is registered as \"mymarket\"; attempting to update a marketplace after removing it; a fresh environment where setup never added the marketplace; scripts hard-coding a name that was renamed.","solutions":["List registered marketplaces (e.g. via the manager's registry/list API) and use the exact name.","If it was never added, call addMarketplace(source) first.","Re-add the marketplace if it was removed."],"exampleFix":"// before\nawait manager.updateMarketplace(\"my-market\"); // registered as \"my-marketplace\"\n// after\nconst names = (await manager.listMarketplaces()).map(m => m.name);\nawait manager.updateMarketplace(names[0]);","handlingStrategy":"validation","validationCode":"const reg = JSON.parse(await Bun.file(registryPath).text());\nif (!reg.marketplaces.some(m => m.name === name)) {\n  throw new Error(`\"${name}\" is not registered. Known: ${reg.marketplaces.map(m => m.name).join(\", \")}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await manager.updateMarketplace(name);\n} catch (err) {\n  if ((err as Error).message.includes(\"not found\")) {\n    await manager.addMarketplace(source); // add before update\n  } else throw err;\n}","preventionTips":["Always enumerate registered marketplace names before update/remove calls.","Store marketplace names in config rather than hard-coding strings in scripts.","Watch for case/typo mismatches — lookup is exact."],"tags":["registry","not-found","marketplace","lookup"],"backgroundTag":"entry-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}