{"record":{"id":"4cde3d6001932469","repo":"badges/shields","slug":"port-not-found","errorCode":null,"errorMessage":"port not found","messagePattern":"port not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/vcpkg/vcpkg-version.service.js","lineNumber":63,"sourceCode":"\n  static render({ version }) {\n    return renderVersionBadge({ version })\n  }\n\n  async handle({ portName }) {\n    try {\n      const manifest = await fetchJsonFromRepo(this, {\n        schema: vcpkgManifestSchema,\n        user: 'microsoft',\n        repo: 'vcpkg',\n        branch: 'master',\n        filename: `ports/${portName}/vcpkg.json`,\n      })\n      const version = parseVersionFromVcpkgManifest(manifest)\n      return this.constructor.render({ version })\n    } catch (error) {\n      if (error instanceof NotFound) {\n        throw new NotFound({\n          prettyMessage: 'port not found',\n        })\n      }\n      throw error\n    }\n  }\n}\n","sourceCodeStart":45,"sourceCodeEnd":71,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/vcpkg/vcpkg-version.service.js#L45-L71","documentation":"The vcpkg version badge handle() catches NotFound errors raised while fetching or parsing the port manifest (e.g. GitHub 404 for ports/<name>/vcpkg.json) and rethrows them as a user-facing NotFound with 'port not found'. It means the requested port name does not correspond to a manifest file in the vcpkg repository. Other errors are rethrown unchanged.","triggerScenarios":"Requesting a vcpkg version badge with a portName for which the raw manifest fetch returns 404/NotFound; also triggered if a downstream NotFound bubbles up during manifest parsing.","commonSituations":"Typo in the port name; the port was removed or renamed in the vcpkg registry; using a port that exists only in a custom registry not covered by the badge.","solutions":["Check the port name spelling and confirm it exists at ports/<name>/vcpkg.json in microsoft/vcpkg.","Search the vcpkg registry for the current name (ports get renamed/removed).","If the port lives in a custom registry, the badge (which reads the microsoft/vcpkg repo) cannot serve it."],"exampleFix":"// before\n/badge/vcpkg/v/mypkg\n// after\n/badge/vcpkg/v/my-actual-port-name","handlingStrategy":"validation","validationCode":"const exists = await fetch(`https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/${portName}/vcpkg.json`, { method: 'HEAD' }); if (!exists.ok) throw new Error('port does not exist in microsoft/vcpkg')","typeGuard":null,"tryCatchPattern":"try { renderBadge() } catch (e) { if (e instanceof NotFound && e.prettyMessage === 'port not found') return 'unknown port'; throw e }","preventionTips":["Check the port exists at ports/<name>/vcpkg.json in microsoft/vcpkg before embedding the badge.","Track vcpkg port renames/removals if you maintain many badges.","Note the badge only reads the microsoft/vcpkg registry, not custom registries."],"tags":["not-found","packaging","badges"],"backgroundTag":"upstream-resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}