{"record":{"id":"16968d724a302864","repo":"kubernetes/kops","slug":"failed-to-list-dns-zones-w","errorCode":null,"errorMessage":"failed to list DNS zones: %w","messagePattern":"failed to list DNS zones: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go","lineNumber":111,"sourceCode":"}\n\n// Zones returns an implementation of dnsprovider.Zones\nfunc (d Interface) Zones() (dnsprovider.Zones, bool) {\n\treturn &zones{\n\t\tdomainAPI: d.domainAPI,\n\t}, true\n}\n\n// zones is an implementation of dnsprovider.Zones\ntype zones struct {\n\tdomainAPI DomainAPI\n}\n\n// List returns a list of all dns zones\nfunc (z *zones) List() ([]dnsprovider.Zone, error) {\n\tdnsZones, err := z.domainAPI.ListDNSZones(&domain.ListDNSZonesRequest{}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list DNS zones: %w\", err)\n\t}\n\n\tzonesList := []dnsprovider.Zone(nil)\n\tfor _, dnsZone := range dnsZones.DNSZones {\n\t\tnewZone := &zone{\n\t\t\tname:      dnsZone.Domain,\n\t\t\tdomainAPI: z.domainAPI,\n\t\t}\n\t\tzonesList = append(zonesList, newZone)\n\t}\n\n\treturn zonesList, nil\n}\n\n// Add adds a new DNS zone. The name of the new zone should be of the form \"name.domain\", otherwise we can't infer the\n// domain name from anywhere else in this function\nfunc (z *zones) Add(newZone dnsprovider.Zone) (dnsprovider.Zone, error) {\n\tnewZoneNameSplit := strings.SplitN(newZone.Name(), \".\", 2)","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go#L93-L129","documentation":"Scaleway zones.List wraps a failure of ListDNSZones (called with WithAllPages to fetch every zone). It fires when the Scaleway domain API errors while enumerating DNS zones — auth token rejected, throttling, or network failure; the SDK error is propagated via %w.","triggerScenarios":"Thrown at dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify Scaleway credentials","Check the Scaleway API status","Retry the zone listing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}