{"record":{"id":"8645fe07f44583cd","repo":"grafana/k6","slug":"unsupported-compression-type-s-this-is-a-bug-in","errorCode":null,"errorMessage":"unsupported compression type %s - this is a bug in k6, please report it","messagePattern":"unsupported compression type (.+?) - this is a bug in k6, please report it","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/netext/httpext/compression.go","lineNumber":210,"sourceCode":"\n\treturn result, respErr\n}\n\nfunc pickDecoder(compression CompressionType, rc *readCloser) (io.Reader, error) {\n\tvar decoder io.Reader\n\tvar err error\n\tswitch compression {\n\tcase CompressionTypeDeflate:\n\t\tdecoder, err = zlib.NewReader(rc)\n\tcase CompressionTypeGzip:\n\t\tdecoder, err = gzip.NewReader(rc)\n\tcase CompressionTypeZstd:\n\t\tdecoder, err = zstd.NewReader(rc)\n\tcase CompressionTypeBr:\n\t\tdecoder = brotli.NewReader(rc)\n\tdefault:\n\t\t// We have not implemented a compression ... :(\n\t\terr = fmt.Errorf(\n\t\t\t\"unsupported compression type %s - this is a bug in k6, please report it\",\n\t\t\tcompression,\n\t\t)\n\t}\n\n\treturn decoder, err\n}\n","sourceCodeStart":192,"sourceCodeEnd":218,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/lib/netext/httpext/compression.go#L192-L218","documentation":"Raised by pickDecoder when a response's Content-Encoding maps to a CompressionType with no decoder branch. The message states this is an internal k6 defect: a new compression type exists in the enum but no reader was implemented, so it asks the user to report a bug rather than fix config.","triggerScenarios":"Thrown at lib/netext/httpext/compression.go:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report the issue to the k6 project (github.com/grafana/k6/issues) with the response Content-Encoding","Work around by requesting the resource without that encoding (e.g. adjust Accept-Encoding)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}