{"record":{"id":"384d7408976accad","repo":"badges/shields","slug":"plugin-not-found","errorCode":null,"errorMessage":"plugin not found","messagePattern":"plugin not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/jenkins/jenkins-plugin-version.service.js","lineNumber":47,"sourceCode":"  }\n\n  async fetch() {\n    return getCachedResource({\n      url: 'https://updates.jenkins-ci.org/current/update-center.actual.json',\n      ttl: 4 * 3600 * 1000, // 4 hours in milliseconds\n      scraper: json =>\n        Object.keys(json.plugins).reduce((previous, current) => {\n          previous[current] = json.plugins[current].version\n          return previous\n        }, {}),\n    })\n  }\n\n  async handle({ plugin }) {\n    const versions = await this.fetch()\n    const version = versions[plugin]\n    if (version === undefined) {\n      throw new NotFound({ prettyMessage: 'plugin not found' })\n    }\n    return this.constructor.render({ version })\n  }\n}\n","sourceCodeStart":29,"sourceCodeEnd":52,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/jenkins/jenkins-plugin-version.service.js#L29-L52","documentation":"The Jenkins plugin version badge service throws a NotFound error when the requested plugin name does not appear in the plugin version data fetched from the Jenkins update-center/API. After fetching the version map, `versions[plugin]` is undefined, meaning Jenkins has no record of that plugin. This is an upstream-data lookup miss, not a network failure.","triggerScenarios":"Requesting /jenkins/plugin/v/<plugin> where the plugin key is not a key in the fetched versions object — i.e. a misspelled plugin id, a plugin that was deleted/renamed, or a plugin not published to the Jenkins update center.","commonSituations":"Typo in the plugin artifact id in the badge URL (e.g. using the display name 'Blue Ocean' instead of the id 'blueocean'); plugin removed from the update center; private/custom plugin never published; case-sensitive key mismatch.","solutions":["Verify the exact plugin id on https://plugins.jenkins.io/ and use it in the badge URL (ids are case-sensitive).","If the plugin was renamed or deprecated, switch the badge to the new plugin id or remove it.","Confirm the service's fetch() target (Jenkins update center) is reachable and the plugin exists there, not just in a private update site."],"exampleFix":"// before\n/badges/jenkins/plugin/v/Blue Ocean\n// after\n/badges/jenkins/plugin/v/blueocean","handlingStrategy":"validation","validationCode":"const PLUGIN_ID_RE = /^[a-z0-9-]+$/;\nif (!PLUGIN_ID_RE.test(plugin)) {\n  throw new Error(`Invalid Jenkins plugin id: ${plugin}`);\n}\n// confirm existence first:\nconst res = await fetch(`https://plugins.jenkins.io/api/plugin/${plugin}`);\nif (res.status === 404) throw new Error(`Unknown Jenkins plugin: ${plugin}`);","typeGuard":"function hasPluginVersion(versions, plugin) {\n  return Object.prototype.hasOwnProperty.call(versions, plugin) && typeof versions[plugin] === 'string';\n}","tryCatchPattern":"try {\n  const badge = await getJenkinsPluginVersionBadge(plugin);\n} catch (e) {\n  if (e.name === 'NotFound') {\n    renderFallback(`plugin '${plugin}' not found in Jenkins update center`);\n  } else throw e;\n}","preventionTips":["Copy plugin ids directly from plugins.jenkins.io instead of typing them","Remember ids are case-sensitive kebab-case artifact ids, not display names","Pre-validate the plugin id format before building badge URLs"],"tags":["jenkins","not-found","plugin"],"backgroundTag":"upstream-resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}