{"record":{"id":"443ac754f1eb4b3a","repo":"JuliusBrussee/caveman","slug":"cacheengine-max-request-bytes-must-be-within-0","errorCode":null,"errorMessage":"cacheengine: max request bytes must be within 0..%d","messagePattern":"cacheengine: max request bytes must be within 0\\.\\.(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/engine.go","lineNumber":63,"sourceCode":"\t\t\tresolveProfile: defaultProfile, drivers: map[string]Driver{}, configErr: err,\n\t\t}\n\t}\n\treturn engine\n}\n\n// NewChecked validates configuration at construction time. New preserves its\n// original one-result API but stores the same configuration error and makes all\n// operations fail closed.\nfunc NewChecked(config Config) (*Engine, error) {\n\treturn newEngine(config)\n}\n\nfunc newEngine(config Config) (*Engine, error) {\n\tif config.MaxKeyShards < 0 || config.MaxKeyShards > maxConfiguredKeyShards {\n\t\treturn nil, fmt.Errorf(\"cacheengine: max key shards must be within 0..%d\", maxConfiguredKeyShards)\n\t}\n\tif config.MaxRequestBytes < 0 || config.MaxRequestBytes > maxConfiguredByteLimit {\n\t\treturn nil, fmt.Errorf(\"cacheengine: max request bytes must be within 0..%d\", maxConfiguredByteLimit)\n\t}\n\tif config.MaxStablePrefixBytes < 0 || config.MaxStablePrefixBytes > maxConfiguredByteLimit {\n\t\treturn nil, fmt.Errorf(\"cacheengine: max stable prefix bytes must be within 0..%d\", maxConfiguredByteLimit)\n\t}\n\tmaxShards := config.MaxKeyShards\n\tif maxShards == 0 {\n\t\tmaxShards = 64\n\t}\n\tmaxRequestBytes := config.MaxRequestBytes\n\tif maxRequestBytes == 0 {\n\t\tmaxRequestBytes = defaultInputByteLimit\n\t}\n\tmaxStablePrefixBytes := config.MaxStablePrefixBytes\n\tif maxStablePrefixBytes == 0 {\n\t\tmaxStablePrefixBytes = defaultInputByteLimit\n\t}\n\tresolver := config.ResolveProfile\n\tif resolver == nil {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/engine.go#L45-L81","documentation":"Error \"cacheengine: max request bytes must be within 0..%d\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/engine.go:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set max request bytes within the allowed range."],"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-15T17:31:12.345Z"}