{"record":{"id":"46d37c8512658a70","repo":"grafana/k6","slug":"exponent-e-is-required","errorCode":null,"errorMessage":"exponent (e) is required","messagePattern":"exponent \\(e\\) is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/webcrypto/jwk.go","lineNumber":317,"sourceCode":"\tD   string `json:\"d,omitempty\"`  // Private exponent\n\tP   string `json:\"p,omitempty\"`  // First prime factor\n\tQ   string `json:\"q,omitempty\"`  // Second prime factor\n\tDp  string `json:\"dp,omitempty\"` // Exponent1\n\tDq  string `json:\"dq,omitempty\"` // Exponent2\n\tQi  string `json:\"qi,omitempty\"` // Coefficient\n}\n\nfunc (jwk *rsaJWK) validate() error {\n\tif jwk.Kty != \"RSA\" {\n\t\treturn fmt.Errorf(\"invalid key type: %s\", jwk.Kty)\n\t}\n\n\tif jwk.N == \"\" {\n\t\treturn errors.New(\"modulus (n) is required\")\n\t}\n\n\tif jwk.E == \"\" {\n\t\treturn errors.New(\"exponent (e) is required\")\n\t}\n\n\t// TODO: consider validating the other fields in future\n\treturn nil\n}\n\nfunc importRSAJWK(jsonKeyData []byte) (any, CryptoKeyType, int, error) {\n\tvar jwk rsaJWK\n\tif err := json.Unmarshal(jsonKeyData, &jwk); err != nil {\n\t\treturn nil, UnknownCryptoKeyType, 0, fmt.Errorf(\"failed to parse input as RSA JWK key: %w\", err)\n\t}\n\n\tif err := jwk.validate(); err != nil {\n\t\treturn nil, UnknownCryptoKeyType, 0, fmt.Errorf(\"invalid RSA JWK key: %w\", err)\n\t}\n\n\t// decode the various key components\n\tnBytes, err := base64URLDecode(jwk.N)","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/webcrypto/jwk.go#L299-L335","documentation":"Error \"exponent (e) is required\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/js/modules/k6/webcrypto/jwk.go:317 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}