{"record":{"id":"86d28d9c1c2f624b","repo":"badges/shields","slug":"repository-not-found","errorCode":null,"errorMessage":"repository not found","messagePattern":"repository not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/docker/docker-helpers.js","lineNumber":51,"sourceCode":"      pattern: ':user/:repo/:tag*',\n    }\n  } else {\n    return {\n      base: `docker/${badgeName}`,\n      pattern: ':user/:repo',\n    }\n  }\n}\n\nfunction getDockerHubUser(user) {\n  return user === '_' ? 'library' : user\n}\n\nasync function getMultiPageData({ user, repo, fetch }) {\n  const data = await fetch({ user, repo })\n\n  if (data.count === 0) {\n    throw new NotFound({ prettyMessage: 'repository not found' })\n  }\n\n  const numberOfPages = Math.ceil(data.count / 100) // Maximum of 100 results can be returned per page\n\n  if (numberOfPages === 1) {\n    return data.results\n  }\n\n  const pageData = await Promise.all(\n    [...Array(numberOfPages - 1).keys()].map((_, i) =>\n      fetch({ user, repo, page: ++i + 1 }),\n    ),\n  )\n  return [...data.results].concat(...pageData.map(p => p.results))\n}\n\nfunction getDigestSemVerMatches({ data, digest }) {\n  const matches = data","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/docker/docker-helpers.js#L33-L69","documentation":"docker-helpers.getMultiPageData throws NotFound with prettyMessage 'repository not found' when the Docker Hub API returns count === 0 for the tags listing of the requested user/repo. A zero count means Docker Hub has no tags at all for that repository, which the service treats as the repository effectively not being usable/found.","triggerScenarios":"Requesting a Docker badge for a user/repo whose tags list has count 0 - the namespace doesn't exist, the repo was deleted, or the repo exists but has zero tags.","commonSituations":"Typo in the Docker Hub namespace or repository name; private repos invisible to unauthenticated API calls; deleted or newly created repos with no pushes yet.","solutions":["Verify the repository exists on Docker Hub (https://hub.docker.com/r/<user>/<repo>) and has at least one tag","Check the user/repo spelling in the badge URL","If the repo is private, badges cannot access it anonymously - make it public or use an authenticated context","Push at least one image tag to the repository"],"exampleFix":"// before\n/badge/docker/pulls/myuser/no-such-repo -> repository not found\n// after\n/badge/docker/pulls/library/nginx","handlingStrategy":"validation","validationCode":"async function dockerRepoHasTags(user, repo) {\n  const res = await fetch(`https://hub.docker.com/v2/repositories/${user}/${repo}/tags?page_size=1`)\n  if (!res.ok) return false\n  const data = await res.json()\n  return data.count > 0\n}","typeGuard":"function hasTagResults(data) {\n  return typeof data?.count === 'number' && data.count > 0 && Array.isArray(data.results)\n}","tryCatchPattern":"try {\n  const data = await getDockerBadge(user, repo)\n} catch (err) {\n  if (err.prettyMessage === 'repository not found') {\n    data = null // show 'repo not found' fallback\n  } else throw err\n}","preventionTips":["Verify the repo exists on hub.docker.com and has at least one tag before embedding badges","Double-check namespace/repo spelling","Private repos can't be read anonymously - use public repos for badges","Watch for renamed or deleted repositories and update badge URLs"],"tags":["docker","docker-hub","not-found","upstream-api"],"backgroundTag":"docker-repository-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}