{"record":{"id":"871a63403a116420","repo":"badges/shields","slug":"repo-not-found-reponame","errorCode":null,"errorMessage":"repo not found: ${repoName}","messagePattern":"repo not found: (.+?)","errorType":"exception","errorClass":"NotFound","httpStatus":null,"severity":"error","filePath":"services/ros/ros-version.service.js","lineNumber":157,"sourceCode":"    return { ...renderVersionBadge({ version }), label: `ros | ${distro}` }\n  }\n\n  static _parseReleaseVersionFromDistro(distroYaml, repoName) {\n    let distro\n    try {\n      distro = yaml.load(distroYaml)\n    } catch (err) {\n      throw new InvalidResponse({\n        prettyMessage: 'unparseable distribution.yml',\n        underlyingError: err,\n      })\n    }\n\n    const validatedDistro = this._validate(distro, distroSchema, {\n      prettyErrorMessage: 'invalid distribution.yml',\n    })\n    if (!validatedDistro.repositories[repoName]) {\n      throw new NotFound({ prettyMessage: `repo not found: ${repoName}` })\n    }\n\n    const repoInfo = this._validate(\n      validatedDistro.repositories[repoName],\n      repoSchema,\n      {\n        prettyErrorMessage: `invalid section for ${repoName} in distribution.yml`,\n      },\n    )\n\n    // Strip off \"release inc\" suffix\n    return repoInfo.release.version.replace(/-\\d+$/, '')\n  }\n}\n","sourceCodeStart":139,"sourceCodeEnd":172,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/ros/ros-version.service.js#L139-L172","documentation":"This NotFound error is thrown by the ROS version service when the requested repository name does not exist in the distribution.yml file fetched from the rosdistro repository. The service validates the distro file, then looks up repositories[repoName]; a miss means the user asked for a repo that is not registered in that ROS distribution. It is an intentional 'resource not found' badge error, not a bug.","triggerScenarios":"Requesting a badge with a `repo` query parameter (or package name mapped to a repo) that is not a key in the target distro's repositories map — e.g. typos in the repo name, a repo that exists only in a different ROS distro (melodic vs noetic), or a repo that was renamed/removed upstream.","commonSituations":"Developers copy a badge URL from another distro's README; a package was migrated out of rosdistro; hyphen/underscore mistakes between package name and repo name (ROS package names often differ from the repo key); querying an EOL distro whose file no longer lists the repo.","solutions":["Verify the exact repo key exists in the distribution.yml of the requested ROS distro at github.com/ros/rosdistro (check the `repositories:` section)","Confirm the distro name in the badge URL matches a supported ROS release (e.g. noetic, humble)","Remember the repo key may differ from the package name; if the service supports package lookup, use the package name instead","If the repo was recently added, re-check later — the distro file may not have been released/synced yet"],"exampleFix":"// before\nhttps://img.shields.io/ros/v/noetic/mypackage_ros\n// after (use correct repo/package key as listed in rosdistro)\nhttps://img.shields.io/ros/v/noetic/mypackage","handlingStrategy":"validation","validationCode":"// Pre-check the repo key in the distro file before building the badge URL\nasync function repoExistsInDistro(distro, repoName) {\n  const res = await fetch(`https://raw.githubusercontent.com/ros/rosdistro/master/${distro}/distribution.yaml`)\n  const text = await res.text()\n  return text.includes(`${repoName}:`) // or parse the YAML properly\n}\nif (!(await repoExistsInDistro('noetic', 'mypackage'))) throw new Error('repo not in noetic distro')","typeGuard":"function hasRepo(distro, repoName) {\n  return Boolean(distro && distro.repositories && distro.repositories[repoName])\n}","tryCatchPattern":"try {\n  const badge = await fetchBadgeUrl(rosBadgeUrl)\n} catch (e) {\n  if (/repo not found/.test(e.message)) {\n    console.warn(`ROS repo not in distro: check distribution.yaml repositories section`)\n  } else throw e\n}","preventionTips":["Always verify the repo key in the distro's distribution.yaml before embedding the badge","Remember repo keys can differ from ROS package names","Re-validate badges when a repo is renamed or removed from rosdistro","Pin badges to distros where the repo is confirmed to exist"],"tags":["ros","not-found","badge","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}