{"record":{"id":"8fc9ea28afcf0d43","repo":"badges/shields","slug":"unknown-8fc9ea","errorCode":null,"errorMessage":"unknown","messagePattern":"unknown","errorType":"exception","errorClass":"NotFound","httpStatus":null,"severity":"info","filePath":"services/puppetforge/puppetforge-module-feedback.service.js","lineNumber":43,"sourceCode":"          },\n        ),\n      },\n    },\n  }\n\n  static defaultBadgeData = { label: 'score' }\n\n  static render({ score }) {\n    return {\n      message: `${score}%`,\n      color: coveragePercentageColor(score),\n    }\n  }\n\n  async handle({ user, moduleName }) {\n    const data = await this.fetch({ user, moduleName })\n    if (data.feedback_score == null) {\n      throw new NotFound({ prettyMessage: 'unknown' })\n    }\n    return this.constructor.render({ score: data.feedback_score })\n  }\n}\n","sourceCodeStart":25,"sourceCodeEnd":48,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/puppetforge/puppetforge-module-feedback.service.js#L25-L48","documentation":"The Puppet Forge module feedback score badge throws NotFound with 'unknown' when the Forge API response has a null `feedback_score`. Some modules have never received a feedback score, so the service signals the score is unknown rather than rendering a badge.","triggerScenarios":"Requesting the feedback-score badge for a module whose Forge API `feedback_score` is null — typically modules with no rating data or recently updated metrics.","commonSituations":"Newly published modules before the Forge computes scores; modules with insufficient downloads/ratings; stale module slugs.","solutions":["Verify the module exists on Puppet Forge and has received user feedback","Confirm the user/moduleName slug is correct","Wait for the Forge to populate feedback data for a recently published module"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const meta = await fetch(`https://forgeapi.puppet.com/v3/modules/${user}-${moduleName}`)\nconst { feedback_score } = await meta.json()\nif (feedback_score == null) console.warn('no feedback score yet')","typeGuard":"function hasFeedbackScore(data) { return data != null && typeof data.feedback_score === 'number' }","tryCatchPattern":"try {\n  const badge = await service.handle({ user, moduleName })\n} catch (err) {\n  if (err instanceof NotFound && err.prettyMessage === 'unknown') {\n    return renderBadge({ label: 'feedback', message: 'unknown' })\n  }\n  throw err\n}","preventionTips":["Only use the feedback badge for established modules with ratings","Treat null feedback_score as expected for new modules","Verify slugs against the Forge module page"],"tags":["badge","puppetforge","not-found"],"backgroundTag":"missing-upstream-metadata","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}