{"record":{"id":"915a2ebae3b2cccf","repo":"argoproj/argo-workflows","slug":"failure-to-create-workflow-client-w","errorCode":null,"errorMessage":"failure to create workflow client: %w","messagePattern":"failure to create workflow client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/auth/gatekeeper.go","lineNumber":354,"sourceCode":"\tif claims.Email != \"\" {\n\t\tfields[\"email\"] = claims.Email\n\t}\n\treturn fields\n}\n\nfunc DefaultClientForAuthorization(authorization string, config *rest.Config) (*rest.Config, *servertypes.Clients, error) {\n\trestConfig, err := kubeconfig.GetRestConfig(authorization)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to create REST config: %w\", err)\n\t}\n\trestConfig = mergeServerRestConfig(config, restConfig)\n\tdynamicClient, err := dynamic.NewForConfig(restConfig)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failure to create dynamic client: %w\", err)\n\t}\n\twfClient, err := workflow.NewForConfig(restConfig)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failure to create workflow client: %w\", err)\n\t}\n\teventsClient, err := events.NewForConfig(restConfig)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failure to create events client: %w\", err)\n\t}\n\tkubeClient, err := kubernetes.NewForConfig(restConfig)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failure to create kubernetes client: %w\", err)\n\t}\n\treturn restConfig, &servertypes.Clients{\n\t\tDynamic:    dynamicClient,\n\t\tWorkflow:   wfClient,\n\t\tEvents:     eventsClient,\n\t\tKubernetes: kubeClient,\n\t}, nil\n}\n\nfunc mergeServerRestConfig(argoServerConfig *rest.Config, newConfig *rest.Config) *rest.Config {","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/server/auth/gatekeeper.go#L336-L372","documentation":"DefaultClientForAuthorization could not construct the workflow clientset (workflow.NewForConfig) from the merged rest.Config. Like its siblings, it means the per-request Kubernetes clients could not be initialized for this authorization.","triggerScenarios":"Thrown at server/auth/gatekeeper.go:354 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the config problem","Verify server kubeconfig and the caller's credential format"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}