{"record":{"id":"807547dbe0b693e6","repo":"badges/shields","slug":"no-images-found-for-arch-arch","errorCode":null,"errorMessage":"no images found for arch ${arch}","messagePattern":"no images found for arch (.+?)","errorType":"exception","errorClass":"InvalidResponse","httpStatus":null,"severity":"error","filePath":"services/docker/docker-version.service.js","lineNumber":140,"sourceCode":"    if (!tag && sort === 'date') {\n      version = data.results[0].name\n      if (version !== 'latest') {\n        return { version }\n      }\n      const imageTag = data.results[0].images.find(i => i.architecture === arch) // Digest is the unique field that we utilise to match images\n      if (!imageTag) {\n        throw new InvalidResponse({\n          prettyMessage: 'digest not found for latest tag',\n        })\n      }\n      const { digest } = imageTag\n      return { version: getDigestSemVerMatches({ data: pagedData, digest }) }\n    } else if (!tag && sort === 'semver') {\n      const matches = data\n        .filter(d => d.images.some(image => image.architecture === arch))\n        .map(d => d.name)\n      if (matches.length === 0) {\n        throw new InvalidResponse({\n          prettyMessage: `no images found for arch ${arch}`,\n        })\n      }\n      return { version: latest(matches) }\n    } else {\n      version = data.find(d => d.name === tag)\n      if (!version) {\n        throw new NotFound({ prettyMessage: 'tag not found' })\n      }\n      if (Object.keys(version.images).length === 0) {\n        return { version: version.name }\n      }\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      }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/docker/docker-version.service.js#L122-L158","documentation":"This InvalidResponse is thrown by the Docker Hub version service's transform step when the user requests a badge filtered by CPU architecture (e.g. arch=arm64) with sort=semver and no tag, but none of the tag listing entries returned by the Docker Hub API contain an image with that architecture. It signals that the requested arch does not exist among the images of any matching tag, so no semver-ordered version can be computed. It is a response-validity error, not a client error in the badge server itself.","triggerScenarios":"Calling the docker version badge endpoint without a tag and with sort=semver and an arch query param whose value matches no image architecture in any tag returned by Docker Hub (data.filter(d => d.images.some(i => i.architecture === arch)) yields zero matches).","commonSituations":"Typo in the arch query parameter (e.g. arch=x86 instead of amd64, arch=arm instead of arm64); the repository publishes only multi-arch manifests under names the filter doesn't see; the image was built for a single arch; Docker Hub response schema changes.","solutions":["Check the arch query parameter spelling against Docker Hub's architecture values (amd64, arm, arm64, 386, ppc64le, s390x).","Inspect the repository on Docker Hub to confirm images exist for the requested arch; remove or correct the arch param if not.","Use a tag-agnostic query first to list available architectures, then pick a supported one."],"exampleFix":"// before\n/badge/docker/v/_/myrepo?sort=semver&arch=x86_64\n// after\n/badge/docker/v/_/myrepo?sort=semver&arch=amd64","handlingStrategy":"validation","validationCode":"const VALID_ARCHES = ['386','amd64','arm','arm64','ppc64le','s390x'];\nif (!VALID_ARCHES.includes(arch)) {\n  throw new Error(`arch must be one of ${VALID_ARCHES.join(', ')}, got: ${arch}`);\n}","typeGuard":"function isValidArch(arch) {\n  return ['386','amd64','arm','arm64','ppc64le','s390x'].includes(arch);\n}","tryCatchPattern":null,"preventionTips":["Always use Docker Hub's canonical architecture names (amd64, arm64, 386, arm, ppc64le, s390x).","List the repo's images on Docker Hub to confirm the arch exists before pinning it in a badge URL.","Omit arch if you don't specifically need an architecture-specific digest."],"tags":["docker","architecture","bad-request","upstream-response"],"backgroundTag":"no-image-found-for-arch","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}