{"record":{"id":"70e250d051196b0c","repo":"JuliusBrussee/caveman","slug":"cachebench-invalid-replay-provider","errorCode":null,"errorMessage":"cachebench: invalid replay provider","messagePattern":"cachebench: invalid replay provider","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay_http.go","lineNumber":128,"sourceCode":"\t\t\tclone.Timeout = requestTimeout\n\t\t}\n\t\tclient = &clone\n\t}\n\tclient.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }\n\treturn &HTTPReplayTransport{client: client, credentials: config.Credentials, baseURLs: parsed, maxRequestBytes: requestLimit, maxResponseBytes: limit}, nil\n}\n\n// Send authenticates and sends one bounded provider request without retry.\nfunc (transport *HTTPReplayTransport) Send(ctx context.Context, outbound ReplayOutbound) (ReplayResponse, error) {\n\tif transport == nil || transport.client == nil {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: nil HTTP replay transport\")\n\t}\n\tif int64(len(outbound.Body)) > transport.maxRequestBytes {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: replay body exceeds configured request limit\")\n\t}\n\tprovider := strings.ToLower(strings.TrimSpace(outbound.Provider))\n\tif !validBoundedText(provider, 64, false) {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: invalid replay provider\")\n\t}\n\tendpoint, err := transport.endpoint(provider, outbound)\n\tif err != nil {\n\t\treturn ReplayResponse{}, err\n\t}\n\tif !validUniqueJSONObject(outbound.Body) {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: replay body must be one JSON object\")\n\t}\n\trequest, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint.String(), bytes.NewReader(outbound.Body))\n\tif err != nil {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: could not build provider request\")\n\t}\n\trequest.Header.Set(\"content-type\", \"application/json\")\n\trequest.Header.Set(\"accept\", \"application/json\")\n\trequest.Header.Set(\"user-agent\", \"caveman-cachebench-replay/1\")\n\tif err := transport.authorize(provider, outbound.Region, request, outbound.Body); err != nil {\n\t\treturn ReplayResponse{}, err\n\t}","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/cacheengine/cachebench/replay_http.go#L110-L146","documentation":"Error \"cachebench: invalid replay provider\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at cacheengine/cachebench/replay_http.go:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported replay provider."],"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"}