Skip to content

Conversation

@eliseomartelli
Copy link
Contributor

Refactor answerHost to throw descriptive DNSResolverError instances
instead of returning nil when IP allocation or parsing fails.

@makhov
Copy link
Contributor

makhov commented Jun 17, 2025

Arer you sure we need to throw errors here? As far as I understood, the server collects results from different places and return .nonExistentDomain if nothing found

https://github.com/apple/container/blob/main/Sources/DNSServer/DNSServer%2BHandle.swift#L59-L61

Refactor answerHost to throw descriptive `DNSResolverError` instances
instead of returning nil when IP  allocation or parsing fails.
@eliseomartelli eliseomartelli force-pushed the eliseomartelli/throwerrors branch from d5ab862 to 59ff0ce Compare June 17, 2025 18:25
@eliseomartelli eliseomartelli requested a review from jglogan June 18, 2025 13:00
@jglogan jglogan merged commit b5589f7 into apple:main Jun 27, 2025
2 checks passed
@jglogan
Copy link
Contributor

jglogan commented Jun 27, 2025

@eliseomartelli Sorry for the delay, I was traveling this week. Approved and merged, thanks for improving those error responses!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants