badges/shields · error · NotFound
distribution.yaml not found: ${distro}@${prettyRef}
Error message
distribution.yaml not found: ${distro}@${prettyRef} What it means
The ROS version badge throws NotFound 'distribution.yaml not found: <distro>@<ref>' when the GitHub content query succeeds but the response has no data.repository.object — i.e. the distribution.yaml file for that ROS distro and git ref does not exist in ros/rosdistro. The requested distro/ref combination is invalid for the repository.
Source
Thrown at services/ros/ros-version.service.js:130
query: gql`
query ($expression: String!) {
repository(owner: "ros", name: "rosdistro") {
object(expression: $expression) {
... on Blob {
text
}
}
}
}
`,
variables: {
expression: `${ref}:${distro}/distribution.yaml`,
},
schema: contentSchema,
})
if (!contentJson.data.repository.object) {
throw new NotFound({
prettyMessage: `distribution.yaml not found: ${distro}@${prettyRef}`,
})
}
const version = this.constructor._parseReleaseVersionFromDistro(
contentJson.data.repository.object.text,
repoName,
)
return { ...renderVersionBadge({ version }), label: `ros | ${distro}` }
}
static _parseReleaseVersionFromDistro(distroYaml, repoName) {
let distro
try {
distro = yaml.load(distroYaml)
} catch (err) {
throw new InvalidResponse({
prettyMessage: 'unparseable distribution.yml',View on GitHub (pinned to 766fd8bc89)
Solutions
- Use a currently supported ROS distro name that exists in ros/rosdistro (check rosdistro repo for <distro>/distribution.yaml)
- Verify the git ref (branch/tag) used contains the distro's distribution.yaml
- Correct the typo in the distro parameter of the badge URL
Example fix
// before /badge/ros/v/mypkg/melodic (removed distro) // after /badge/ros/v/mypkg/noetic
Defensive patterns
Strategy: validation
Validate before calling
const res = await fetch(`https://raw.githubusercontent.com/ros/rosdistro/${ref}/${distro}/distribution.yaml`)
if (!res.ok) throw new Error(`distribution.yaml not found for ${distro}@${ref}`) Type guard
function hasDistroObject(contentJson) {
return contentJson?.data?.repository?.object != null &&
typeof contentJson.data.repository.object.text === 'string'
} Try / catch
try {
const badge = await service.handle({ distro: 'noetic', repoName: 'mypkg' })
} catch (err) {
if (err instanceof NotFound && err.prettyMessage.startsWith('distribution.yaml not found')) {
return renderBadge({ label: 'ros', message: 'n/a' })
}
throw err
} Prevention
- Check ros/rosdistro for the distro's distribution.yaml before using the badge
- Avoid EOL distros that have been removed from the rosdistro master branch
- Pin a ref known to contain the distro file if you must pin
When it happens
Trigger: Requesting a badge with a distro name not present in rosdistro for the given ref (e.g. 'melodic' after EOL removal, or a future distro), or a ref (branch/tag) where the file path `<ref>:<distro>/distribution.yaml` doesn't resolve.
Common situations: ROS distros removed from the master rosdistro branch after EOL; typos in the distro name; pinning an old commit ref where the distro file hadn't been added yet.
Related errors
- repo not found: ${repoName}
- bucket "${bucket}" not found
- package not found
- gist not found
- no matching releases found
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/5c569324cb8df7ff.
Report an issue: GitHub.