{"record":{"id":"cbcb211c46628541","repo":"badges/shields","slug":"no-plugin-ratings","errorCode":null,"errorMessage":"No Plugin Ratings","messagePattern":"No Plugin Ratings","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"warning","filePath":"services/jetbrains/jetbrains-rating.service.js","lineNumber":102,"sourceCode":"      const jetbrainsPluginData = await this._requestJson({\n        schema: jetbrainsSchema,\n        url: `https://plugins.jetbrains.com/api/plugins/${this.constructor._cleanPluginId(\n          pluginId,\n        )}/rating`,\n        httpErrors: { 400: 'not found' },\n      })\n\n      let voteSum = 0\n      let voteCount = 0\n      const votes = jetbrainsPluginData.votes\n      Object.entries(votes).forEach(([rating, votes]) => {\n        voteSum += parseInt(rating) * votes\n        voteCount += votes\n      })\n      const meanRating = jetbrainsPluginData.meanRating\n\n      if (voteCount === 0) {\n        throw new NotFound({ prettyMessage: 'No Plugin Ratings' })\n      }\n\n      // JetBrains Plugin Rating Formula from:\n      // https://plugins.jetbrains.com/docs/marketplace/plugins-rating.html\n      rating = (voteSum + 2 * meanRating) / (voteCount + 2)\n    }\n\n    return this.constructor.render({ rating, format })\n  }\n}\n","sourceCodeStart":84,"sourceCodeEnd":113,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/jetbrains/jetbrains-rating.service.js#L84-L113","documentation":"The JetBrains plugin rating service throws NotFound with 'No Plugin Ratings' when the aggregated voteCount is 0, i.e. the plugin has zero user votes in the marketplace data. With no votes there is no meaningful rating to render (the Bayesian formula would just return meanRating). It indicates a real but empty-data condition rather than a lookup failure.","triggerScenarios":"Requesting /jetbrains/plugin/r/<pluginId> for a plugin whose fetched ratings XML yields no rating entries, so the votes accumulation loop adds nothing and voteCount stays 0.","commonSituations":"Brand-new plugin with no user reviews yet; very obscure plugin nobody has rated; pluginId resolving to a plugin whose rating data was wiped after republication.","solutions":["Wait until the plugin accumulates user ratings on the marketplace, then re-render the badge.","Use the downloads or version badge instead of the rating badge for unrated plugins.","Verify the pluginId is correct — a wrong id may resolve to an empty/unrated repository entry."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Check the marketplace API for existing ratings before rendering the rating badge:\nconst res = await fetch(`https://plugins.jetbrains.com/api/plugins/${pluginId}/reviews`);\nconst reviews = await res.json();\nif (!Array.isArray(reviews) || reviews.length === 0) console.warn('plugin has no ratings yet');","typeGuard":"function hasRatings(ratingEntries) {\n  return Array.isArray(ratingEntries) && ratingEntries.reduce((n, e) => n + (e.votes || 0), 0) > 0;\n}","tryCatchPattern":"try {\n  badge = await getJetBrainsRatingBadge(pluginId);\n} catch (e) {\n  if (e.name === 'NotFound') {\n    badge = renderBadge('rating', 'unrated');\n  } else throw e;\n}","preventionTips":["For new plugins prefer the downloads or version badge until ratings exist","Show 'unrated' as a graceful placeholder in dashboards","Confirm the pluginId is correct — a wrong id can resolve to an unrated entry"],"tags":["jetbrains","rating","empty-data","not-found"],"backgroundTag":"empty-upstream-dataset","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}