{"record":{"id":"26dd5bba777bb6d9","repo":"grafana/k6","slug":"no-retryable-status-codes-provided","errorCode":null,"errorMessage":"no retryable status codes provided","messagePattern":"no retryable status codes provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloudapi/insights/client.go","lineNumber":273,"sourceCode":"\twithCodes := grpcRetry.WithCodes(rSC...)\n\twithMax := grpcRetry.WithMax(retryConfig.MaxAttempts)\n\twithPerRetryTimeout := grpcRetry.WithPerRetryTimeout(retryConfig.PerRetryTimeout)\n\tcallOptions := []grpcRetry.CallOption{withCodes, withMax, withPerRetryTimeout}\n\n\tbackoffConfig := retryConfig.BackoffConfig\n\tif backoffConfig.Enabled {\n\t\tbackoff := grpcRetry.WithBackoff(\n\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}","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/cloudapi/insights/client.go#L255-L291","documentation":"Returned by retryableStatusCodes when the retryable status codes setting is an empty string while a retry configuration is in effect — there is nothing to retry on, so the interceptor cannot be built.","triggerScenarios":"Thrown at internal/cloudapi/insights/client.go:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one valid gRPC status code to retry, e.g. 'Unavailable'","Disable the retry configuration entirely instead of leaving it empty"],"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"}