apple / swift-async-dns-resolver

A Swift library for asynchronous DNS requests, wrapping c-ares with Swift-friendly APIs and data structures.
Apache License 2.0
82 stars 12 forks source link

Map DNSSD errors to the library error types #36

Closed gmilos closed 1 month ago

gmilos commented 2 months ago

I'm using the library to query A records for a domain where that validly times out. I'm running on macOS, therefore the the call is handled through DNSSDDNSResolver.queryA.

I get the following error:

other [-65568]:

This maps to: https://developer.apple.com/documentation/dnssd/1823426-anonymous/kdnsserviceerr_timeout, this should be translated to AsyncDNSResolver.Error.timeout.

More generally, the different error types DNSSD provides should be mapped too: https://developer.apple.com/documentation/dnssd/1823426-anonymous

This is already being done for Ares.

glbrntt commented 1 month ago

What version are you using @gmilos? I think this was fixed in 0.3.0

gmilos commented 1 month ago

We are on 0.3.1, the problem is still present there. Looking a bit deeper.

gmilos commented 1 month ago

Looks like you resolved it here: https://github.com/apple/swift-async-dns-resolver/pull/27, but it's not tagged. Can you generate one for us?

glbrntt commented 1 month ago

Ah, you're right, I mixed it up with #24. I just tagged 0.4.0.