{"record":{"id":"0311a769191bd533","repo":"grafana/k6","slug":"invalid-status-code-s-provided","errorCode":null,"errorMessage":"invalid status code %s provided","messagePattern":"invalid status code (.+?) provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloudapi/insights/client.go","lineNumber":281,"sourceCode":"\t\t\tgrpcRetry.BackoffExponentialWithJitter(backoffConfig.WaitBetween, backoffConfig.JitterFraction))\n\t\tcallOptions = append(callOptions, backoff)\n\t}\n\n\tunaryInterceptor := grpcRetry.UnaryClientInterceptor(callOptions...)\n\treturn unaryInterceptor, nil\n}\n\nfunc retryableStatusCodes(retryableStatusCodes string) ([]codes.Code, error) {\n\tif len(retryableStatusCodes) == 0 {\n\t\treturn nil, fmt.Errorf(\"no retryable status codes provided\")\n\t}\n\n\tstatusCodes := strings.Split(retryableStatusCodes, \",\")\n\terrorCodes := make([]codes.Code, len(statusCodes))\n\tfor i, code := range statusCodes {\n\t\terr := errorCodes[i].UnmarshalJSON([]byte(code))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid status code %s provided\", code)\n\t\t}\n\t}\n\n\treturn errorCodes, nil\n}\n\ntype perRPCCredentials struct {\n\tmetadata                 map[string]string\n\trequireTransportSecurity bool\n}\n\nfunc newPerRPCCredentials(cfg ClientAuthConfig) perRPCCredentials {\n\treturn perRPCCredentials{\n\t\tmetadata: map[string]string{\n\t\t\ttestRunIDHeader:     fmt.Sprintf(\"%d\", cfg.TestRunID),\n\t\t\tauthorizationHeader: fmt.Sprintf(\"Token %s\", cfg.Token),\n\t\t},\n\t\trequireTransportSecurity: cfg.RequireTransportSecurity,","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/cloudapi/insights/client.go#L263-L299","documentation":"Returned by retryableStatusCodes while iterating the comma-separated retry code list: one entry failed to convert to a grpc codes.Code (unknown or misspelled code name).","triggerScenarios":"Thrown at internal/cloudapi/insights/client.go:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the invalid entry with a valid gRPC code name such as 'Unavailable', 'DeadlineExceeded', or 'Internal'","Check the message for the offending token and fix or remove it"],"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"}