Instances carry a stable AddressError.kind so callers can branch on
the failure without matching message text. Errors raised while validating a
Message are collected in an AggregateError and keep their kind.
Example
try { awaitclient.send(newMessage().from("noreply@acme.example").to(input)); } catch (error) { if (errorinstanceofAggregateError) { for (constproblemoferror.errors) { if (probleminstanceofAddressError && problem.kind === addressErrorKind.invalidDomain) { // The domain is not resolvable as a DNS name. } } } }
A mailbox address that could not be parsed.
Instances carry a stable AddressError.kind so callers can branch on the failure without matching message text. Errors raised while validating a Message are collected in an
AggregateErrorand keep their kind.Example