{"record":{"id":"bd84f1041260b3ef","repo":"grafana/k6","slug":"unknown-websocket-s-option-s","errorCode":null,"errorMessage":"unknown WebSocket's option %s","messagePattern":"unknown WebSocket's option (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/websockets/params.go","lineNumber":82,"sourceCode":"\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif v, ok := jarV.Export().(*httpModule.CookieJar); ok {\n\t\t\t\tparsed.cookieJar = v.Jar\n\t\t\t}\n\t\tcase \"compression\":\n\t\t\t// deflate compression algorithm is supported - as defined in RFC7692\n\t\t\t// compression here relies on the implementation in gorilla/websocket package, usage is\n\t\t\t// experimental and may result in decreased performance. package supports\n\t\t\t// only \"no context takeover\" scenario\n\n\t\t\talgoString := strings.TrimSpace(params.Get(k).ToString().String())\n\t\t\tif algoString != \"deflate\" {\n\t\t\t\treturn nil, fmt.Errorf(\"unsupported compression algorithm '%s', supported algorithm is 'deflate'\", algoString)\n\t\t\t}\n\n\t\t\tparsed.enableCompression = true\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unknown WebSocket's option %s\", k)\n\t\t}\n\t}\n\n\treturn parsed, nil\n}\n","sourceCodeStart":64,"sourceCodeEnd":88,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/websockets/params.go#L64-L88","documentation":"Returned by buildParams when the WebSocket options object contains a key that is none of headers, tags, jar or compression. The params parser is strict — unknown keys are rejected rather than ignored — so leftover or misspelled options (e.g. 'header' instead of 'headers') abort connection setup with the offending key name in the message.","triggerScenarios":"Thrown at internal/js/modules/k6/websockets/params.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove unrecognized keys from the params object","Check spelling of supported keys: headers, tags, jar, compression"],"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-14T00:17:10.932Z"}