{"record":{"id":"f2a9eb573f810d83","repo":"shadcn-ui/ui","slug":"not-found-f2a9eb","errorCode":"NOT_FOUND","errorMessage":"The item at ${url} was not found. It may not exist at the registry.","messagePattern":"The item at (.+?) was not found\\. It may not exist at the registry\\.","errorType":"http","errorClass":"RegistryNotFoundError","httpStatus":404,"severity":"error","filePath":"packages/shadcn/src/registry/fetcher.ts","lineNumber":95,"sourceCode":"                })\n                .safeParse(json)\n\n              if (parsed.success) {\n                // Prefer RFC 7807 detail field, then message field.\n                messageFromServer = parsed.data.detail || parsed.data.message\n\n                if (parsed.data.error) {\n                  messageFromServer = `[${parsed.data.error}] ${messageFromServer}`\n                }\n              }\n            }\n\n            if (response.status === 401) {\n              throw new RegistryUnauthorizedError(url, messageFromServer)\n            }\n\n            if (response.status === 404) {\n              throw new RegistryNotFoundError(url, messageFromServer)\n            }\n\n            if (response.status === 410) {\n              throw new RegistryGoneError(url, messageFromServer)\n            }\n\n            if (response.status === 403) {\n              throw new RegistryForbiddenError(url, messageFromServer)\n            }\n\n            throw new RegistryFetchError(\n              url,\n              response.status,\n              messageFromServer\n            )\n          }\n\n          return response.json()","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/shadcn-ui/ui/blob/efac5987074af84ece57c367c6dd83387b967022/packages/shadcn/src/registry/fetcher.ts#L77-L113","documentation":"Thrown by fetchRegistry when the registry endpoint responds with HTTP 404. RegistryNotFoundError means the requested item or catalog URL does not exist at the registry. The URL that 404'd is included; the server's message is attached as cause when available.","triggerScenarios":"Requesting an item name that the registry does not serve (typo or removed), pointing at a registry URL whose path is wrong, or fetching an item from a registry that only exposes a catalog. Also when an upstream registry retires an item.","commonSituations":"Item renamed or removed upstream, wrong registry base URL, missing '{name}' placeholder substitution, or a private registry that returns 404 instead of 401 for unauthenticated requests.","solutions":["Verify the exact item name against the registry's published catalog.","Open the failing URL in a browser to confirm the 404.","Check the registry URL template and the {name} placeholder spelling.","If the item was renamed, update the reference to the new name."],"exampleFix":"// before\nnpx shadcn add @myorg/old-button-name\n\n// after (after checking the catalog)\nnpx shadcn add @myorg/button","handlingStrategy":"validation","validationCode":"async function catalogHasItem(registryUrl: string, itemName: string) {\n  const [catalog] = await fetchRegistry([registryUrl]);\n  return Array.isArray(catalog.items) && catalog.items.some(i => i.name === itemName);\n}\n// check before fetching the item directly","typeGuard":"function itemExistsInCatalog(catalog: { items?: { name: string }[] }, name: string): boolean {\n  return Array.isArray(catalog.items) && catalog.items.some(i => i.name === name);\n}","tryCatchPattern":"try {\n  await fetchRegistry([url]);\n} catch (err) {\n  if (err instanceof RegistryNotFoundError) {\n    // fetch the catalog and suggest the closest matching item name\n  }\n  throw err;\n}","preventionTips":["List the catalog first and pick item names from the returned list.","Keep the {name} placeholder in registry URL templates to avoid path drift.","Pin registry versions to avoid upstream removals."],"tags":["network","not-found","registry","typescript"],"backgroundTag":null,"analyzedSha":"efac5987074af84ece57c367c6dd83387b967022","analyzedAt":"2026-08-12T05:00:50.218Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}