badges/shields · error · NotFound

resource not found

Error message

resource not found

What it means

The WordPress base service throws NotFound when the WordPress.org API response contains an 'error' key, indicating the requested plugin/theme slug does not exist on WordPress.org. This fetch is shared by the plugin/theme info, version, and rating endpoints.

Source

Thrown at services/wordpress/wordpress-base.js:82

            screenshot_url: 0,
            downloaded: 1,
            last_updated: 1,
            requires_php: 1,
          },
        },
      },
      { encode: false },
    )

    const json = await this._requestJson({
      url,
      schema: schemas,
      options: {
        searchParams: queryString,
      },
    })
    if ('error' in json) {
      throw new NotFound()
    }
    return json
  }
}

export const description = `
These badges rely on an API that is no longer supported by Wordpress. You are
still free to use them, simply bear in mind that Shields.io cannot guarantee
that they'll keep on working in the future. Please also double-check the
provided slug, as an incorrect value may lead to unexpected results.
`

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Check the slug in the plugin/theme URL on wordpress.org (e.g. wordpress.org/plugins/<slug>)
  2. Ensure the correct extensionType ('plugin' vs 'theme') is used
  3. If the plugin was closed/removed, remove the badge or link to its successor
  4. Verify casing — slugs are lowercase with hyphens

Example fix

// before
fetch({ extensionType: 'plugin', slug: 'WooCommerce' })
// after
fetch({ extensionType: 'plugin', slug: 'woocommerce' })
Defensive patterns

Strategy: validation

Validate before calling

// confirm the slug exists in the wordpress.org directory first
const api = extensionType === 'theme'
  ? `https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=${slug}`
  : `https://api.wordpress.org/plugins/info/1.0/${slug}.json`
const info = await fetch(api).then(r => r.json())
if (!info || info.error) throw new Error(`Unknown wordpress ${extensionType}: ${slug}`);

Type guard

function isRealExtension(json) { return json != null && !('error' in json) }

Try / catch

try {
  const data = await service.fetch({ extensionType, slug })
} catch (e) {
  if (e instanceof NotFound) {
    // render 'wordpress | not found'
  } else throw e
}

Prevention

When it happens

Trigger: Calling any wordpress endpoint with a slug that is not in the wordpress.org plugin or theme directory, causing the API to return { error: ... } instead of results.

Common situations: Plugin renamed or closed on wordpress.org, typo in the slug (slugs differ from display names), theme vs plugin type mismatch (querying the plugin directory for a theme slug), premium-only plugins never hosted on wordpress.org.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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