You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DNS-error-payload type is currently defined as this:
/// Defines the case payload type for `DNS-error` above:@since(version=0.2.0)
record DNS-error-payload {
rcode: option<string>,
info-code: option<u16>
}
This has the rcode value be a string. However, DNS rcodes have standardized values that are defined in terms of u16 values.
With the current type being string, implementations appear to be using ad-hoc error messages which don't correspond to any standardized rcode value.
Thinking about this more, I think having the precise u16 value isn't crucial, and at the same time, isn't easy for common implementations to provide. However in that case, the u16 info-code field is also not crucial, and also not easy for those same implementations. So I've now filed WebAssembly/wasi-http#204 to propose just having a simple string.
This kind of detail seems like it might fit better in a more focused wasi:dns interface, which seems like a perfectly sensible thing to have anyway for anything that goes beyond getaddrinfo.
Activity
pchickey commentedon Sep 9, 2025
Also worth considering in wasi-sockets, which makes an ad-hoc mapping: https://github.com/WebAssembly/wasi-sockets/blob/main/wit/ip-name-lookup.wit#L42-L47
Make `DNS-error-payload` just contain a string.
Make `DNS-error-payload` just contain a string.
sunfishcode commentedon Oct 17, 2025
Thinking about this more, I think having the precise
u16value isn't crucial, and at the same time, isn't easy for common implementations to provide. However in that case, theu16info-code field is also not crucial, and also not easy for those same implementations. So I've now filed WebAssembly/wasi-http#204 to propose just having a simple string.lann commentedon Oct 20, 2025
This kind of detail seems like it might fit better in a more focused
wasi:dnsinterface, which seems like a perfectly sensible thing to have anyway for anything that goes beyondgetaddrinfo.