{"record":{"id":"641ec62749c694b2","repo":"Semantic-Org/Semantic-UI","slug":"the-method-you-called-is-not-defined-641ec6","errorCode":null,"errorMessage":"The method you called is not defined","messagePattern":"The method you called is not defined","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/modules/rating.js","lineNumber":471,"sourceCode":"  name          : 'Rating',\n  namespace     : 'rating',\n\n  slent         : false,\n  debug         : false,\n  verbose       : false,\n  performance   : true,\n\n  initialRating : 0,\n  interactive   : true,\n  maxRating     : 4,\n  clearable     : 'auto',\n\n  fireOnInit    : false,\n\n  onRate        : function(rating){},\n\n  error         : {\n    method    : 'The method you called is not defined',\n    noMaximum : 'No maximum rating specified. Cannot generate HTML automatically'\n  },\n\n\n  metadata: {\n    rating    : 'rating',\n    maxRating : 'maxRating'\n  },\n\n  className : {\n    active   : 'active',\n    disabled : 'disabled',\n    selected : 'selected',\n    loading  : 'loading'\n  },\n\n  selector  : {\n    icon : '.icon'","sourceCodeStart":453,"sourceCodeEnd":489,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/rating.js#L453-L489","documentation":"NOTE: unlike the other Semantic modules, rating.js's invoke() hits the unknown-method branch but does NOT call module.error(error.method) — it simply returns false (line 407-409). So although this string is registered in settings.error, a developer will never see it at runtime; an unknown $('.foo').rating('badMethod') call is a silent no-op. The string documents intent only.","triggerScenarios":"Calling $('.ui.rating').rating('unknownMethod'). Nothing is logged and nothing happens — no feedback, unlike sibling modules.","commonSituations":"Calling a non-existent rating behavior and expecting a console error like the other modules; debugging a dead call with no output.","solutions":["Verify the method name (valid rating behaviors: 'get rating', 'set rating', 'disable', 'enable', 'destroy')","Be aware this module silently ignores unknown methods — add your own debug logging around the call if you need feedback"],"exampleFix":"// before\n$('.ui.rating').rating('setRating', 3);  // silently ignored\n// after\n$('.ui.rating').rating('set rating', 3);","handlingStrategy":"validation","validationCode":"var RATING_BEHAVIORS = ['get rating','set rating','disable','enable','destroy'];\nfunction isRatingBehavior(name) { return RATING_BEHAVIORS.indexOf(name) !== -1; }\nif (isRatingBehavior(method)) {\n  $('.ui.rating').rating(method, arg);\n} else {\n  // rating.js silently ignores unknown methods, so log explicitly yourself\n  console.warn('rating: unknown behavior', method);\n}","typeGuard":"function isRatingMethod(name) {\n  return /^get rating$|^set rating$|^(disable|enable|destroy)$/.test(name);\n}","tryCatchPattern":null,"preventionTips":["Because rating.js silently ignores unknown methods, add your own validation/log around the call","Use the dotted 'set rating'/'get rating' forms exactly","Write a thin typed wrapper that only exposes the known behaviors so mistakes surface at build time"],"tags":["rating","semantic-ui","api-misuse","silent-failure","dead-code"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}