Variant

error-code

Lookup error codes.

variant error-code {
  access-denied,
  invalid-argument,
  name-unresolvable,
  temporary-resolver-failure,
  permanent-resolver-failure,
  other(option​<string>),
}

Cases

CasePayloadDescription
access-denied—

Access denied.

POSIX equivalent: EACCES, EPERM

invalid-argument—

name is a syntactically invalid domain name or IP address.

POSIX equivalent: EINVAL

name-unresolvable—

Name does not exist or has no suitable associated IP addresses.

POSIX equivalent: EAI_NONAME, EAI_NODATA, EAI_ADDRFAMILY

temporary-resolver-failure—

A temporary failure in name resolution occurred.

POSIX equivalent: EAI_AGAIN

permanent-resolver-failure—

A permanent failure in name resolution occurred.

POSIX equivalent: EAI_FAIL

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.