Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions proposals/sockets/wit-0.3.0-draft/ip-name-lookup.wit
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ interface ip-name-lookup {

/// Lookup error codes.
@since(version = 0.3.0-rc-2026-02-09)
enum error-code {
/// Unknown error
///
/// This is an escape hatch for WASI implementations to handle failures
/// that can not be categorized under any of the other error codes.
unknown,

variant error-code {
/// Access denied.
///
/// POSIX equivalent: EACCES, EPERM
Expand All @@ -36,6 +30,11 @@ interface ip-name-lookup {
///
/// POSIX equivalent: EAI_FAIL
permanent-resolver-failure,

/// A catch-all for errors not captured by the existing variants.
/// Implementations can use this to extend the error type without
/// breaking existing code.
other(option<string>),
}

/// Resolve an internet host name to a list of IP addresses.
Expand Down
13 changes: 6 additions & 7 deletions proposals/sockets/wit-0.3.0-draft/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ interface types {
///
/// See each individual API for what the POSIX equivalents are. They sometimes differ per API.
@since(version = 0.3.0-rc-2026-02-09)
enum error-code {
/// Unknown error.
///
/// This is an escape hatch for WASI implementations to handle failures
/// that can not be categorized under any of the other error codes.
unknown,

variant error-code {
/// Access denied.
///
/// POSIX equivalent: EACCES, EPERM
Expand Down Expand Up @@ -91,6 +85,11 @@ interface types {
///
/// POSIX equivalent: EMSGSIZE
datagram-too-large,

/// A catch-all for errors not captured by the existing variants.
/// Implementations can use this to extend the error type without
/// breaking existing code.
other(option<string>),
}

@since(version = 0.3.0-rc-2026-02-09)
Expand Down
Loading