{"record":{"id":"cf73dca30990789f","repo":"apache/superset","slug":"all-values-must-be-numeric","errorCode":null,"errorMessage":"All values must be numeric","messagePattern":"All values must be numeric","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"superset-frontend/plugins/plugin-chart-echarts/src/utils/controls.ts","lineNumber":34,"sourceCode":" * specific language governing permissions and limitations\n * under the License.\n */\n\nimport { validateNumber } from '@superset-ui/core';\n\nexport function parseAxisBound(\n  bound?: string | number | null,\n): number | undefined {\n  if (bound === undefined || bound === null || Number.isNaN(Number(bound))) {\n    return undefined;\n  }\n  return Number(bound);\n}\n\nexport function parseNumbersList(value: string, delim = ';') {\n  if (!value?.trim()) return [];\n  return value.split(delim).map(num => {\n    if (validateNumber(num)) throw new Error('All values must be numeric');\n    return Number(num);\n  });\n}\n","sourceCodeStart":16,"sourceCodeEnd":38,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-frontend/plugins/plugin-chart-echarts/src/utils/controls.ts#L16-L38","documentation":"On the versioned language-pack script route (superset/views/core.py:724), the <version> path segment must match ^[0-9a-f]{12}$ — a 12-character lowercase hex content hash (it keys immutable browser caching of script.js). Anything else (short hash, 'latest', uppercase, non-hex) aborts 400 'Invalid language pack version'. The lang check runs before this, so a bad lang yields error 505 instead.","triggerScenarios":"GET /language_pack/pt_BR/v2/script.js, /language_pack/en/ABC123DEF456/script.js (uppercase), a 40-char git-style sha, or an empty version segment; also hardcoding a version string in templates instead of reading the current pack version.","commonSituations":"Custom HTML templates or reverse-proxy rewrites that pin a version literal; after a Superset upgrade the pack content hash changed and old clients request a version they computed differently; tooling passing the translations file mtime or build number as version.","solutions":["Obtain the version from get_language_pack_version(lang) (the same helper the server uses) and request exactly that","Re-fetch the current version whenever translations change instead of caching it indefinitely","Normalize: lowercase hex, exactly 12 characters"],"exampleFix":"# before\nurl = f\"/language_pack/{lang}/latest/script.js\"  # 400\n\n# after\nfrom superset.utils.language_pack import get_language_pack_version\nversion = get_language_pack_version(lang)\nurl = f\"/language_pack/{lang}/{version}/script.js\"","handlingStrategy":"validation","validationCode":"import re\n\ndef valid_version(v: str) -> bool:\n    return bool(re.fullmatch(r\"[0-9a-f]{12}\", v))","typeGuard":"const isPackVersion = (v: string): boolean => /^[0-9a-f]{12}$/.test(v);","tryCatchPattern":null,"preventionTips":["Fetch the version from the server's pack metadata (get_language_pack_version) instead of guessing","Versions are 12-char lowercase hex content hashes — never 'latest', build numbers, or SHA-256 prefixes of other length"],"tags":["superset","i18n","validation","http-400","caching"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}