Variant

error-code

Error codes.

variant error-code {
  access-denied,
  not-supported,
  invalid-argument,
  out-of-memory,
  timeout,
  invalid-state,
  address-not-bindable,
  address-in-use,
  remote-unreachable,
  connection-refused,
  connection-broken,
  connection-reset,
  connection-aborted,
  datagram-too-large,
  other(option​<string>),
}

Cases

CasePayloadDescription
access-deniedAccess denied.
not-supportedThe operation is not supported.
invalid-argumentOne of the arguments is invalid.
out-of-memoryNot enough memory to complete the operation.
timeoutThe operation timed out before it could finish completely.
invalid-stateThe operation is not valid in the socket's current state.
address-not-bindableThe local address is not available.
address-in-useA bind operation failed because the provided address is already in use or because there are no ephemeral ports available.
remote-unreachableThe remote address is not reachable.
connection-refusedThe connection was forcefully rejected.
connection-brokenA write failed because the connection was broken.
connection-resetThe connection was reset.
connection-abortedThe connection was aborted.
datagram-too-largeThe size of a datagram sent to a UDP socket exceeded the maximum supported size.
otheroption​<string>A catch-all for errors not captured by the existing variants. Implementations can use this to extend the error type without breaking existing code.