badges/shields · info · NotFound

none

Error message

none

What it means

The Puppet Forge PDK badge throws NotFound with 'none' when the module's `current_release.pdk` flag is false — i.e. the latest release was not built with the Puppet Development Kit, so there is no pdk-version metadata to render.

Source

Thrown at services/puppetforge/puppetforge-module-pdk-version.service.js:40

          {
            name: 'moduleName',
            example: 'azure_key_vault',
          },
        ),
      },
    },
  }

  static defaultBadgeData = { label: 'pdk version' }

  async handle({ user, moduleName }) {
    const data = await this.fetch({ user, moduleName })
    if (data.current_release.pdk) {
      return renderVersionBadge({
        version: data.current_release.metadata['pdk-version'],
      })
    } else {
      throw new NotFound({ prettyMessage: 'none' })
    }
  }
}

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Migrate the module to PDK and run `pdk build` for a new release so `current_release.pdk` becomes true
  2. Only display the PDK badge on modules whose current Forge release is PDK-built
  3. Check the module's Forge page to confirm PDK readiness before adding the badge

Example fix

// before
$ puppet-module build        // legacy tooling, pdk flag false
// after
$ pdk build                  // release marked as PDK-built
Defensive patterns

Strategy: validation

Validate before calling

const meta = await fetch(`https://forgeapi.puppet.com/v3/modules/${user}-${moduleName}`)
const { current_release } = await meta.json()
if (!current_release?.pdk) console.warn('current release is not PDK-built')

Type guard

function isPdkBuilt(data) { return data?.current_release?.pdk === true && typeof data.current_release.metadata?.['pdk-version'] === 'string' }

Try / catch

try {
  return await service.handle({ user, moduleName })
} catch (err) {
  if (err instanceof NotFound && err.prettyMessage === 'none') {
    return renderBadge({ label: 'pdk', message: 'not PDK' })
  }
  throw err
}

Prevention

When it happens

Trigger: Requesting the PDK-ready badge for a module whose current release lacks `pdk: true` in its Forge metadata, or whose metadata has no 'pdk-version' entry.

Common situations: Modules still built with the legacy puppet-module tooling; a new release reverted to non-PDK builds; user applies the badge to modules that never adopted PDK.

Related errors


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