{"record":{"id":"242994fe0cfa4b48","repo":"JuliusBrussee/caveman","slug":"cachebench-replay-request-timeout-must-be-between","errorCode":null,"errorMessage":"cachebench: replay request timeout must be between 1 second and 1 hour","messagePattern":"cachebench: replay request timeout must be between 1 second and 1 hour","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay_http.go","lineNumber":71,"sourceCode":"\tif requestLimit == 0 {\n\t\trequestLimit = 64 << 20\n\t}\n\tif requestLimit < 1 || requestLimit > 256<<20 {\n\t\treturn nil, errors.New(\"cachebench: replay request limit must be between 1 byte and 256 MiB\")\n\t}\n\tlimit := config.MaxResponseBytes\n\tif limit == 0 {\n\t\tlimit = defaultReplayResponseLimit\n\t}\n\tif limit < 1 || limit > 256<<20 {\n\t\treturn nil, errors.New(\"cachebench: replay response limit must be between 1 byte and 256 MiB\")\n\t}\n\trequestTimeout := config.RequestTimeout\n\tif requestTimeout == 0 {\n\t\trequestTimeout = 2 * time.Minute\n\t}\n\tif requestTimeout < time.Second || requestTimeout > time.Hour {\n\t\treturn nil, errors.New(\"cachebench: replay request timeout must be between 1 second and 1 hour\")\n\t}\n\tbases := map[string]string{\n\t\t\"openai\":    \"https://api.openai.com\",\n\t\t\"anthropic\": \"https://api.anthropic.com\",\n\t\t\"gemini\":    \"https://generativelanguage.googleapis.com\",\n\t}\n\tfor provider, value := range config.BaseURLs {\n\t\tprovider = strings.ToLower(strings.TrimSpace(provider))\n\t\tif provider != \"openai\" && provider != \"anthropic\" && provider != \"gemini\" && provider != \"bedrock\" {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: unsupported replay base URL provider %q\", provider)\n\t\t}\n\t\tbases[provider] = value\n\t}\n\tparsed := make(map[string]*url.URL, len(bases))\n\tfor provider, value := range bases {\n\t\tbase, err := validateReplayBaseURL(value, config.AllowInsecureLoopback)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"cachebench: %s replay base URL: %w\", provider, err)","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cachebench/replay_http.go#L53-L89","documentation":"Error \"cachebench: replay request timeout must be between 1 second and 1 hour\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cachebench/replay_http.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the replay request timeout between 1 second and 1 hour."],"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"}