{"record":{"id":"699a20832e393fa6","repo":"kubernetes/kops","slug":"listing-route-tables-w","errorCode":null,"errorMessage":"listing route tables: %w","messagePattern":"listing route tables: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/routetable.go","lineNumber":68,"sourceCode":"\t}\n\treturn &rt.RouteTable, err\n}\n\nfunc (c *routeTablesClientImpl) List(ctx context.Context, resourceGroupName string) ([]*network.RouteTable, error) {\n\tif resourceGroupName == \"\" {\n\t\treturn nil, nil\n\t}\n\n\tvar l []*network.RouteTable\n\tpager := c.c.NewListPager(resourceGroupName, nil)\n\tfor pager.More() {\n\t\tresp, err := pager.NextPage(ctx)\n\t\tif err != nil {\n\t\t\tvar respErr *azcore.ResponseError\n\t\t\tif errors.As(err, &respErr) && respErr.ErrorCode == \"ResourceGroupNotFound\" {\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t\treturn nil, fmt.Errorf(\"listing route tables: %w\", err)\n\t\t}\n\t\tl = append(l, resp.Value...)\n\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) {","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/routetable.go#L50-L86","documentation":"Wrapped error when a page of route table listing fails during pager.NextPage in routeTablesClientImpl.List. Note ResourceGroupNotFound is deliberately swallowed and returns an empty list; any other listing failure is wrapped here.","triggerScenarios":"pager.NextPage(ctx) returns an error other than ResourceGroupNotFound: auth failure (403), invalid subscription ID, throttling, or transient 5xx from the ARM list API.","commonSituations":"Service principal lacks Microsoft.Network/routeTables/read; wrong subscription configured; Azure outage or rate limiting during cluster status lookups.","solutions":["Grant the identity Reader/Network Contributor with routeTables/read access on the subscription or resource group","Confirm AZURE_SUBSCRIPTION_ID matches where the cluster's resource group lives","Retry on throttling (429) honoring Retry-After","If the resource group truly should not exist, treat it like the already-handled ResourceGroupNotFound case"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if os.Getenv(\"AZURE_SUBSCRIPTION_ID\") == \"\" {\n\treturn fmt.Errorf(\"AZURE_SUBSCRIPTION_ID must be set\")\n}","typeGuard":"var respErr *azcore.ResponseError\nif errors.As(err, &respErr) {\n\tif respErr.ErrorCode == \"ResourceGroupNotFound\" {\n\t\treturn nil, nil // treat as empty\n\t}\n}","tryCatchPattern":"rts, err := client.List(ctx, rg)\nif err != nil {\n\tvar respErr *azcore.ResponseError\n\tif errors.As(err, &respErr) && respErr.StatusCode == 403 {\n\t\treturn fmt.Errorf(\"missing routeTables/read permission: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Grant Microsoft.Network/routeTables/read to the identity","Match subscription ID to the cluster's resource group","Handle 429 with Retry-After backoff"],"tags":["azure","network","route-table","list-api"],"backgroundTag":"azure-api-request-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"}