JuliusBrussee/caveman · error
number exceeds the supported JSONB numeric size
Error message
number exceeds the supported JSONB numeric size
What it means
Error "number exceeds the supported JSONB numeric size" thrown in JuliusBrussee/caveman.
Source
Thrown at shared/platform/proposalrun/proposalrun.go:173
}
if value, err := number.Float64(); err == nil && !math.IsInf(value, 0) && !math.IsNaN(value) {
legacy, err := json.Marshal(value)
if err == nil {
legacyExact, legacyErr := normalizeJSONNumber(string(legacy))
if legacyErr == nil && legacyExact == exact {
return canonicalJSONNumber(string(legacy)), nil
}
}
}
return canonicalJSONNumber(exact), nil
}
// normalizeJSONNumber converts one JSON number literal to the shortest plain
// decimal that has exactly the same base-10 value. It deliberately avoids
// floating-point conversion; all arithmetic is over digit counts and strings.
func normalizeJSONNumber(literal string) (string, error) {
if len(literal) == 0 || len(literal) > maxJSONBNumberLexeme {
return "", fmt.Errorf("number exceeds the supported JSONB numeric size")
}
start := 0
negative := false
if literal[0] == '-' {
negative = true
start = 1
}
if start == len(literal) {
return "", fmt.Errorf("invalid JSON number")
}
mantissaEnd := len(literal)
exponent := 0
for i := start; i < len(literal); i++ {
if literal[i] != 'e' && literal[i] != 'E' {
continue
}
if mantissaEnd != len(literal) {View on GitHub (pinned to 27d5a3981a)
Solutions
- Use a number within the supported JSONB numeric size.
When it happens
Trigger: Thrown at shared/platform/proposalrun/proposalrun.go:173 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/5ae5eada8a41111f.
Report an issue: GitHub.