{"record":{"id":"6452b139b014de6b","repo":"badges/shields","slug":"resource-not-found-6452b1","errorCode":null,"errorMessage":"resource not found","messagePattern":"resource not found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/wordpress/wordpress-base.js","lineNumber":82,"sourceCode":"            screenshot_url: 0,\n            downloaded: 1,\n            last_updated: 1,\n            requires_php: 1,\n          },\n        },\n      },\n      { encode: false },\n    )\n\n    const json = await this._requestJson({\n      url,\n      schema: schemas,\n      options: {\n        searchParams: queryString,\n      },\n    })\n    if ('error' in json) {\n      throw new NotFound()\n    }\n    return json\n  }\n}\n\nexport const description = `\nThese badges rely on an API that is no longer supported by Wordpress. You are\nstill free to use them, simply bear in mind that Shields.io cannot guarantee\nthat they'll keep on working in the future. Please also double-check the\nprovided slug, as an incorrect value may lead to unexpected results.\n`\n","sourceCodeStart":64,"sourceCodeEnd":94,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/wordpress/wordpress-base.js#L64-L94","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the slug in the plugin/theme URL on wordpress.org (e.g. wordpress.org/plugins/<slug>)","Ensure the correct extensionType ('plugin' vs 'theme') is used","If the plugin was closed/removed, remove the badge or link to its successor","Verify casing — slugs are lowercase with hyphens"],"exampleFix":"// before\nfetch({ extensionType: 'plugin', slug: 'WooCommerce' })\n// after\nfetch({ extensionType: 'plugin', slug: 'woocommerce' })","handlingStrategy":"validation","validationCode":"// confirm the slug exists in the wordpress.org directory first\nconst api = extensionType === 'theme'\n  ? `https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=${slug}`\n  : `https://api.wordpress.org/plugins/info/1.0/${slug}.json`\nconst info = await fetch(api).then(r => r.json())\nif (!info || info.error) throw new Error(`Unknown wordpress ${extensionType}: ${slug}`);","typeGuard":"function isRealExtension(json) { return json != null && !('error' in json) }","tryCatchPattern":"try {\n  const data = await service.fetch({ extensionType, slug })\n} catch (e) {\n  if (e instanceof NotFound) {\n    // render 'wordpress | not found'\n  } else throw e\n}","preventionTips":["Copy slugs from the wordpress.org URL rather than the display name","Use lowercase-hyphenated slugs exactly as wordpress.org defines them","Match the extensionType (plugin vs theme) to where the extension is hosted"],"tags":["not-found","wordpress","slug","upstream-api"],"backgroundTag":"resource-not-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}