{"record":{"id":"28118e3febd95db2","repo":"kubernetes/kops","slug":"creating-route-tables-client-w","errorCode":null,"errorMessage":"creating route tables client: %w","messagePattern":"creating route tables client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/routetable.go","lineNumber":89,"sourceCode":"\t}\n\treturn l, nil\n}\n\nfunc (c *routeTablesClientImpl) Delete(ctx context.Context, resourceGroupName, vnetName string) error {\n\tfuture, err := c.c.BeginDelete(ctx, resourceGroupName, vnetName, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deleting route table: %w\", err)\n\t}\n\tif _, err := future.PollUntilDone(ctx, nil); err != nil {\n\t\treturn fmt.Errorf(\"waiting for route table deletion completion: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc newRouteTablesClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*routeTablesClientImpl, error) {\n\tc, err := network.NewRouteTablesClient(subscriptionID, cred, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating route tables client: %w\", err)\n\t}\n\treturn &routeTablesClientImpl{\n\t\tc: c,\n\t}, nil\n}\n","sourceCodeStart":71,"sourceCodeEnd":95,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/routetable.go#L71-L95","documentation":"Wrapped error when network.NewRouteTablesClient fails to build the RouteTablesClient. This happens during client construction inside newRouteTablesClientImpl, invoked from newAzureCloud, so no Azure calls have been made yet.","triggerScenarios":"network.NewRouteTablesClient(subscriptionID, cred, nil) returns error, usually due to empty/invalid subscriptionID or nil/invalid credential passed to the SDK constructor.","commonSituations":"Missing AZURE_SUBSCRIPTION_ID; credential construction failed silently upstream; incompatible azure-sdk-for-go network module versions where the constructor validates inputs.","solutions":["Set a valid AZURE_SUBSCRIPTION_ID (GUID) before cluster operations","Verify DefaultAzureCredential resolves an auth source (env vars, az login, managed identity)","Unwrap %w to see the SDK root cause and fix configuration accordingly","Align azidentity and network SDK module versions in go.mod"],"exampleFix":"// before\ncred, err := azidentity.NewDefaultAzureCredential(nil)\n// after\ncred, err := azidentity.NewDefaultAzureCredential(nil)\nif err != nil {\n\treturn fmt.Errorf(\"no Azure credential available: %w\", err)\n}","handlingStrategy":"validation","validationCode":"if subscriptionID == \"\" {\n\treturn nil, fmt.Errorf(\"subscriptionID must not be empty\")\n}\nif cred == nil {\n\treturn nil, fmt.Errorf(\"credential must not be nil\")\n}","typeGuard":null,"tryCatchPattern":"cloud, err := newAzureCloud(ctx, opt)\nif err != nil {\n\treturn fmt.Errorf(\"initializing azure cloud: %w\", err)\n}","preventionTips":["Validate subscription ID and credential before constructing clients","Ensure DefaultAzureCredential has at least one working auth source","Pin compatible azure-sdk-for-go module versions"],"tags":["azure","client-initialization","credentials"],"backgroundTag":"azure-client-creation-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}