{"record":{"id":"f41a0350d2193131","repo":"badges/shields","slug":"repository-not-found-f41a03","errorCode":null,"errorMessage":"repository not found","messagePattern":"repository not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/docker/docker-version.service.js","lineNumber":170,"sourceCode":"      }\n      const image = version.images.find(i => i.architecture === arch)\n      if (!image) {\n        throw new InvalidResponse({\n          prettyMessage: 'digest not found for given tag',\n        })\n      }\n      const { digest } = image\n      return { version: getDigestSemVerMatches({ data, digest }) }\n    }\n  }\n\n  async handle({ user, repo, tag }, { sort, arch }) {\n    let data, pagedData\n\n    if (!tag && sort === 'date') {\n      data = await this.fetch({ user, repo })\n      if (data.count === 0) {\n        throw new NotFound({ prettyMessage: 'repository not found' })\n      }\n      if (data.results[0].name === 'latest') {\n        pagedData = await getMultiPageData({\n          user,\n          repo,\n          fetch: this.fetch.bind(this),\n        })\n      }\n    } else {\n      data = await getMultiPageData({\n        user,\n        repo,\n        fetch: this.fetch.bind(this),\n      })\n    }\n\n    const { version } = this.transform({\n      tag,","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/docker/docker-version.service.js#L152-L188","documentation":"This NotFound error is thrown in the handle method of the Docker version service when the user requested a date-sorted version (no tag, sort=date) and the Docker Hub API reports data.count === 0, i.e. the repository listing is empty. In practice this means the user/repo combination does not exist (or is private/inaccessible), so Docker Hub returns no results rather than a 404 at fetch time.","triggerScenarios":"Calling the docker version badge with sort=date and no tag where fetch() succeeds but returns count: 0 — a nonexistent repository name, wrong namespace/user, or a private repository the badge server cannot see.","commonSituations":"Typo in user or repo path segment; repository deleted or renamed; private repo without credentials; badge URL built from a moved project (e.g. Docker 'official image' lives under library/ namespace).","solutions":["Verify the user/repo path in the badge URL matches the exact Docker Hub repository path.","Check the repository exists at https://hub.docker.com/r/<user>/<repo>.","If the image is official, prefix with library/ (e.g. /docker/v/_/library/nginx).","Check repository visibility; private repos need accessible credentials on the badge server."],"exampleFix":"// before\n/badge/docker/v/_/myrepo?sort=date        // repo actually at otheruser/myrepo\n// after\n/badge/docker/v/_/otheruser/myrepo?sort=date","handlingStrategy":"validation","validationCode":"const res = await fetch(`https://hub.docker.com/v2/repositories/${user}/${repo}/`);\nif (res.status === 404) throw new Error(`repository ${user}/${repo} does not exist on Docker Hub`);","typeGuard":null,"tryCatchPattern":"try {\n  const { version } = await dockerVersionService.handle({ user, repo }, { sort: 'date' });\n} catch (err) {\n  if (err.message === 'repository not found') {\n    // render placeholder badge / verify repo path\n  } else {\n    throw err;\n  }\n}","preventionTips":["Verify the exact Docker Hub path (hub.docker.com/r/user/repo) before building the badge URL.","Remember official images live under the library/ namespace.","Watch for repository renames/deletions when a badge suddenly breaks."],"tags":["docker","not-found","repository","docker-hub"],"backgroundTag":"resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}