{"record":{"id":"41b8de12083701e5","repo":"grafana/k6","slug":"failed-to-parse-retryable-status-codes-w","errorCode":null,"errorMessage":"failed to parse retryable status codes: %w","messagePattern":"failed to parse retryable status codes: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cloudapi/insights/client.go","lineNumber":253,"sourceCode":"\n\tif cfg.AuthConfig.Enabled {\n\t\topts = append(opts, grpc.WithPerRPCCredentials(newPerRPCCredentials(cfg.AuthConfig)))\n\t}\n\n\trI, err := retryInterceptor(cfg.RetryConfig)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create retry interceptors: %w\", err)\n\t}\n\n\topts = append(opts, grpc.WithChainUnaryInterceptor([]grpc.UnaryClientInterceptor{rI}...))\n\n\treturn opts, nil\n}\n\nfunc retryInterceptor(retryConfig ClientRetryConfig) (grpc.UnaryClientInterceptor, error) {\n\trSC, err := retryableStatusCodes(retryConfig.RetryableStatusCodes)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse retryable status codes: %w\", err)\n\t}\n\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) {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/cloudapi/insights/client.go#L235-L271","documentation":"Wrapped error from retryInterceptor: the configured retryable status codes string could not be converted into gRPC codes (e.g. an entry is not a valid codes.Code name like 'Unavailable').","triggerScenarios":"Thrown at internal/cloudapi/insights/client.go:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use valid gRPC status code names, e.g. 'Unavailable,Internal'","Remove misspelled entries and separate codes with commas only"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}