{"record":{"id":"5ae5eada8a41111f","repo":"JuliusBrussee/caveman","slug":"number-exceeds-the-supported-jsonb-numeric-size","errorCode":null,"errorMessage":"number exceeds the supported JSONB numeric size","messagePattern":"number exceeds the supported JSONB numeric size","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/proposalrun/proposalrun.go","lineNumber":173,"sourceCode":"\t}\n\tif value, err := number.Float64(); err == nil && !math.IsInf(value, 0) && !math.IsNaN(value) {\n\t\tlegacy, err := json.Marshal(value)\n\t\tif err == nil {\n\t\t\tlegacyExact, legacyErr := normalizeJSONNumber(string(legacy))\n\t\t\tif legacyErr == nil && legacyExact == exact {\n\t\t\t\treturn canonicalJSONNumber(string(legacy)), nil\n\t\t\t}\n\t\t}\n\t}\n\treturn canonicalJSONNumber(exact), nil\n}\n\n// normalizeJSONNumber converts one JSON number literal to the shortest plain\n// decimal that has exactly the same base-10 value. It deliberately avoids\n// floating-point conversion; all arithmetic is over digit counts and strings.\nfunc normalizeJSONNumber(literal string) (string, error) {\n\tif len(literal) == 0 || len(literal) > maxJSONBNumberLexeme {\n\t\treturn \"\", fmt.Errorf(\"number exceeds the supported JSONB numeric size\")\n\t}\n\tstart := 0\n\tnegative := false\n\tif literal[0] == '-' {\n\t\tnegative = true\n\t\tstart = 1\n\t}\n\tif start == len(literal) {\n\t\treturn \"\", fmt.Errorf(\"invalid JSON number\")\n\t}\n\n\tmantissaEnd := len(literal)\n\texponent := 0\n\tfor i := start; i < len(literal); i++ {\n\t\tif literal[i] != 'e' && literal[i] != 'E' {\n\t\t\tcontinue\n\t\t}\n\t\tif mantissaEnd != len(literal) {","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/proposalrun/proposalrun.go#L155-L191","documentation":"Error \"number exceeds the supported JSONB numeric size\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at shared/platform/proposalrun/proposalrun.go:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a number within the supported JSONB numeric size."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}