5662334799
Introduce service.ErrProviderUnavailable, wrapped only around the provider GetRecords call in ZoneRecords. handleZoneRecords and handleTemplateFromZone now use errors.Is against it to tell a real provider outage (502) apart from local resolution failures such as an unknown domain (404), instead of collapsing every ZoneRecords error into a blanket 502. Also fixes handleTemplateFromZone's GetDomain error branch to return 404 "domain not found" instead of 500, for consistency with handleSetDomainTemplate/handleDomainHistory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwxdSt4reTm7Dj1oxRvpP3