badges/shields · info · NotFound

none

Error message

none

What it means

The Puppet Forge module endorsement badge throws NotFound with message 'none' when the module's metadata from the Puppet Forge API has a null/undefined `endorsement` field. Endorsement is 'approved' or 'supported' for curated modules; most community modules have none, so this is an expected 'no data' outcome rather than a crash.

Source

Thrown at services/puppetforge/puppetforge-module-endorsement.service.js:47

  static defaultBadgeData = { label: 'endorsement' }

  static render({ endorsement }) {
    let color
    if (endorsement === 'approved') {
      color = 'green'
    } else if (endorsement === 'supported') {
      color = 'brightgreen'
    } else {
      color = 'red'
    }
    return { message: endorsement, color }
  }

  async handle({ user, moduleName }) {
    const { endorsement } = await this.fetch({ user, moduleName })
    if (endorsement == null) {
      throw new NotFound({ prettyMessage: 'none' })
    }
    return this.constructor.render({ endorsement })
  }
}

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Only use the endorsement badge for modules known to be 'supported' or 'approved' on Puppet Forge
  2. Double-check the user/moduleName slug in the badge URL
  3. If the module should be endorsed, contact Puppet or resubmit it for the Forge approval program

Example fix

// before
/badge/puppetforge/endorsement/myuser/mymodule  (community module, no endorsement)
// after
/badge/puppetforge/endorsement/puppetlabs/puppetlabs-apt  (endorsed module)
Defensive patterns

Strategy: validation

Validate before calling

const meta = await fetch(`https://forgeapi.puppet.com/v3/modules/${user}-${moduleName}`)
const { endorsement } = await meta.json()
if (!endorsement) console.warn('module has no Forge endorsement — badge will show none')

Type guard

function isEndorsed(data) { return data != null && typeof data.endorsement === 'string' && data.endorsement.length > 0 }

Try / catch

try {
  return await service.handle({ user, moduleName })
} catch (err) {
  if (err instanceof NotFound && err.prettyMessage === 'none') return null // no endorsement: expected
  throw err
}

Prevention

When it happens

Trigger: Requesting the endorsement badge for a module whose Forge metadata lacks an endorsement value — i.e. any module that has not been approved/supported by Puppet.

Common situations: Using the badge on a community-authored module; module renamed so the wrong slug is resolved; module is unpublished or was never submitted for endorsement.

Related errors


AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30). Data as JSON: /api/errors/932e8d41c4f53d99. Report an issue: GitHub.