grafana/k6 · error
performing request: %w
Error message
performing request: %w
What it means
Raised in requestPresignedURL when httpClient.Do fails while POSTing the JSON body to the presigned-URL endpoint (10s timeout applies). This is the transport failure of obtaining the upload target: DNS resolution failure, connection refused, TLS handshake error, or timeout — distinct from a non-2xx response, which is reported separately by checkStatusCode.
Source
Thrown at internal/js/modules/k6/browser/storage/file_persister.go:147
}
req, err := http.NewRequestWithContext(
ctx,
http.MethodPost,
r.presignedURLRequestURL,
bytes.NewReader(b),
)
if err != nil {
return PresignedURLResponse{}, fmt.Errorf("creating request: %w", err)
}
for k, v := range r.headers {
req.Header.Add(k, v)
}
resp, err := r.httpClient.Do(req) //nolint:gosec
if err != nil {
return PresignedURLResponse{}, fmt.Errorf("performing request: %w", err)
}
defer resp.Body.Close() //nolint:errcheck
if err := checkStatusCode(resp); err != nil {
return PresignedURLResponse{}, err
}
return readPresignedURLResponse(resp)
}
func buildPresignedRequestBody(basePath, path string) ([]byte, error) {
b := struct {
Service string `json:"service"`
Operation string `json:"operation"`
Files []struct {
Name string `json:"name"`
} `json:"files"`
}{View on GitHub (pinned to 01ffac6f24)
Solutions
- Verify network connectivity, DNS, and proxy configuration to the cloud endpoint
- Retry the request; transient network errors are expected during load tests
- Check TLS/CA configuration if handshakes fail in restricted environments
- Confirm the endpoint is reachable and not blocked by firewall rules
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/js/modules/k6/browser/storage/file_persister.go:147 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/c3a8422113873a49.
Report an issue: GitHub.