{"record":{"id":"05da0a4bd4df9b42","repo":"badges/shields","slug":"digest-not-found-for-given-tag","errorCode":null,"errorMessage":"digest not found for given tag","messagePattern":"digest not found for given tag","errorType":"exception","errorClass":"InvalidResponse","httpStatus":null,"severity":"error","filePath":"services/docker/docker-version.service.js","lineNumber":155,"sourceCode":"        .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      }\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({","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/docker/docker-version.service.js#L137-L173","documentation":"This InvalidResponse is thrown when a tag is found in the Docker Hub response and the tag has images, but none of them matches the requested arch (version.images.find(i => i.architecture === arch) is undefined), so the digest for the tag cannot be determined. Docker Hub data is present but does not satisfy the combination of tag and arch the user asked for.","triggerScenarios":"Requesting /docker/v/<user>/<repo>/<tag> with an arch query param when that specific tag has no image built for that architecture (images exist for the tag, just not for the requested arch).","commonSituations":"Single-arch images (e.g. an old tag built only for amd64) requested with arch=arm64; architecture names differing between old/new Docker images; requesting a historic tag before multi-arch builds were introduced.","solutions":["Verify on Docker Hub that the requested tag ships an image for the requested arch.","Omit the arch parameter to accept the default resolution path.","Choose a newer or multi-arch tag that includes the architecture.","Correct architecture naming (amd64 vs x86_64, arm64 vs aarch64)."],"exampleFix":"// before\n/badge/docker/v/_/myrepo/1.2.0?arch=arm64   // 1.2.0 built for amd64 only\n// after\n/badge/docker/v/_/myrepo/1.3.0?arch=arm64","handlingStrategy":"validation","validationCode":"// verify tag+arch combo before requesting\nconst tagData = await fetch(`https://hub.docker.com/v2/repositories/${user}/${repo}/tags/${tag}`).then(r => r.json());\nconst hasArch = tagData.images?.some(i => i.architecture === arch);\nif (!hasArch) throw new Error(`tag ${tag} has no ${arch} image`);","typeGuard":"function tagHasArch(tagEntry, arch) {\n  return Array.isArray(tagEntry?.images) && tagEntry.images.some(i => i.architecture === arch);\n}","tryCatchPattern":null,"preventionTips":["Check the tag's architecture list on Docker Hub before specifying arch.","Use multi-arch tags (or newer versions) when pinning arch.","Avoid mixing arch naming conventions (amd64 not x86_64, arm64 not aarch64)."],"tags":["docker","architecture","digest","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"}