{"record":{"id":"bd89e12705bce542","repo":"JuliusBrussee/caveman","slug":"cachebench-provider-request-failed","errorCode":null,"errorMessage":"cachebench: provider request failed","messagePattern":"cachebench: provider request failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cacheengine/cachebench/replay_http.go","lineNumber":149,"sourceCode":"\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}\n\tresponse, err := transport.client.Do(request)\n\tif err != nil {\n\t\treturn ReplayResponse{}, errors.New(\"cachebench: provider request failed\")\n\t}\n\tdefer response.Body.Close()\n\tbody, err := io.ReadAll(io.LimitReader(response.Body, transport.maxResponseBytes+1))\n\tif err != nil {\n\t\treturn ReplayResponse{StatusCode: response.StatusCode}, errors.New(\"cachebench: provider response read failed\")\n\t}\n\tif int64(len(body)) > transport.maxResponseBytes {\n\t\treturn ReplayResponse{StatusCode: response.StatusCode}, errors.New(\"cachebench: provider response exceeds configured limit\")\n\t}\n\treturn ReplayResponse{\n\t\tStatusCode: response.StatusCode, Body: body,\n\t\tProviderRequestID: providerRequestID(response.Header),\n\t}, nil\n}\n\nfunc (transport *HTTPReplayTransport) endpoint(provider string, outbound ReplayOutbound) (*url.URL, error) {\n\tif !validBoundedText(outbound.Model, 512, false) {\n\t\treturn nil, errors.New(\"cachebench: invalid replay model\")","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/cacheengine/cachebench/replay_http.go#L131-L167","documentation":"Send collapses any transport-level error from the provider HTTP call (DNS, TLS, timeout, connection refused) into this fixed error, so replay results never leak varying network error text into evidence records.","triggerScenarios":"Thrown at cacheengine/cachebench/replay_http.go:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network connectivity and provider endpoint reachability","Verify credentials/region config; retries are intentionally not performed by the transport"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}