{"record":{"id":"8ecbc165c067abea","repo":"Billionmail/BillionMail","slug":"unsupported-dns-provider","errorCode":null,"errorMessage":"Unsupported DNS provider: {}","messagePattern":"Unsupported DNS provider: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/acme/acme.go","lineNumber":437,"sourceCode":"\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set CloudXNS DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"azuredns\":\n\t\t\terr = SetDnsAzuredns(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set AzureDNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"cloudflare\":\n\t\t\terr = SetDnsCloudflare(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Cloudflare DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tcase \"godaddy\":\n\t\t\terr = SetDnsGodaddy(ctx, client, dnsProviderToken)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to set Godaddy DNS verification: {}\", err.Error()))\n\t\t\t}\n\t\tdefault:\n\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Unsupported DNS provider: {}\", dnsProvider))\n\t\t}\n\t}\n\n\t// Register or query existing user on ACME server\n\tvar reg *registration.Resource\n\t// Try to query existing registration first (same key = same account)\n\treg, err = client.Registration.QueryRegistration()\n\tif err != nil || reg == nil {\n\t\t// No existing registration, register new account\n\t\treg, err = client.Registration.Register(registration.RegisterOptions{TermsOfServiceAgreed: true})\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", errors.New(public.LangCtx(ctx, \"Failed to register user: {}\", err.Error()))\n\t\t}\n\t}\n\n\t// Save user information\n\tmyUser.Registration = reg\n","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/acme/acme.go#L419-L455","documentation":"ApplySSLWithExistingServer's DNS branch only recognizes a fixed switch list (tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy). Any other dnsProvider string falls into the default case and returns this error before any ACME interaction. It is a pure input-validation failure — the value never reaches lego.","triggerScenarios":"Calling ApplySSLWithExistingServer (via Apply, StartRenew, ApplyLetsEncryptCertWithHttp, ApplyConsoleCert) with vtype=\"dns\" and a dnsProvider that is empty-after-trim, misspelled (e.g. \"CloudFlare\", \"aliyun\" instead of \"alidns\"), or a provider the app simply does not implement (e.g. dnspod, hetzner).","commonSituations":"Case-sensitivity mistakes from UI dropdowns/API callers; providers added in newer app versions being requested from an older build; free-text config values instead of enum-constrained input.","solutions":["Set dnsProvider to one of the exact supported strings: tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy","Check for casing/whitespace/alias mismatch (e.g. send \"alidns\", not \"aliyun\" or \"CloudFlare\")","If a genuinely new provider is needed, extend the switch in acme.go with a new SetDns* helper rather than passing an unsupported name"],"exampleFix":"// before\ndnsProvider = \"CloudFlare\"\n// after\ndnsProvider = \"cloudflare\"","handlingStrategy":"validation","validationCode":"var supportedDNS = map[string]bool{\n    \"tencentcloud\": true, \"alidns\": true, \"cloudxns\": true,\n    \"azuredns\": true, \"cloudflare\": true, \"godaddy\": true,\n}\nif vtype == \"dns\" && !supportedDNS[strings.TrimSpace(dnsProvider)] {\n    return fmt.Errorf(\"dnsProvider %q not supported; use one of tencentcloud,alidns,cloudxns,azuredns,cloudflare,godaddy\", dnsProvider)\n}","typeGuard":"func isSupportedDNSProvider(p string) bool {\n    switch strings.TrimSpace(p) {\n    case \"tencentcloud\", \"alidns\", \"cloudxns\", \"azuredns\", \"cloudflare\", \"godaddy\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"cert, _, err := ApplySSLWithExistingServer(ctx, ...)\nif err != nil && strings.Contains(err.Error(), \"Unsupported DNS provider\") {\n    return fmt.Errorf(\"fix dnsProvider value: %w\", err)\n}","preventionTips":["Constrain the dnsProvider field to an enum/dropdown, never free text","Normalize casing/whitespace before calling the API","Keep API callers and the server build on the same provider list version"],"tags":["acme","dns-01","validation","unsupported-provider"],"backgroundTag":"dns-provider-unsupported","analyzedSha":"fc36c76c050c3775c5e899faf7403cf0262d2744","analyzedAt":"2026-09-05T21:28:54.019Z","contentChangedAt":"2026-09-05T21:28:54.019Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}