grafana/k6 · error
unknown compression algorithm %s, supported algorithms are %
Error message
unknown compression algorithm %s, supported algorithms are %s
What it means
The 'compression' request option named an algorithm that httpext.CompressionTypeString doesn't recognize. Supported values are listed in the message (gzip, deflate, br/zstd...); the offending algorithm is echoed.
Source
Thrown at js/modules/k6/http/request.go:387
if common.IsNullish(jarV) {
continue
}
if v, ok := jarV.Export().(*CookieJar); ok {
result.ActiveJar = v.Jar
}
case "compression":
algosString := strings.TrimSpace(params.Get(k).ToString().String())
if algosString == "" {
continue
}
algos := strings.Split(algosString, ",")
var err error
result.Compressions = make([]httpext.CompressionType, len(algos))
for index, algo := range algos {
algo = strings.TrimSpace(algo)
result.Compressions[index], err = httpext.CompressionTypeString(algo)
if err != nil {
return nil, fmt.Errorf("unknown compression algorithm %s, supported algorithms are %s",
algo, httpext.CompressionTypeValues())
}
}
case "redirects":
result.Redirects = null.IntFrom(params.Get(k).ToInteger())
case "tags":
if err := common.ApplyCustomUserTags(rt, &result.TagsAndMeta, params.Get(k)); err != nil {
return nil, fmt.Errorf("invalid HTTP request metric tags: %w", err)
}
case "auth":
result.Auth = params.Get(k).String()
case "timeout":
t, err := types.GetDurationValue(params.Get(k).Export())
if err != nil {
return nil, fmt.Errorf("invalid timeout value: %w", err)
}
result.Timeout = t
case "throw":View on GitHub (pinned to 01ffac6f24)
Solutions
- Use one of the supported algorithms from the message, e.g. compression: 'gzip'
- Check for typos and stray whitespace in the algorithm name
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at js/modules/k6/http/request.go:387 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/07adad9ecf512b0c.
Report an issue: GitHub.