Sep31Configuration Exception
Exception thrown when SEP-31 service configuration is invalid before any HTTP call.
Raised by Sep31Service.fromDomain when:
The supplied
domainstring is empty, whitespace, or contains URL-unsafe charactersThe stellar.toml at the supplied domain does not advertise a
DIRECT_PAYMENT_SERVERThe advertised
DIRECT_PAYMENT_SERVERis not an HTTPS URLThe TOML fetch failed (the underlying cause is propagated via cause)
No HTTP status code is associated with this exception because no SEP-31 call completed. Subclasses of Sep31Exception that carry statusCode are reserved for failures that originated on the SEP-31 endpoint itself.
Recovery actions:
Verify the anchor's stellar.toml exposes
DIRECT_PAYMENT_SERVERand that the URL is HTTPSVerify the domain string is well-formed (no slashes, query strings, or whitespace)
Example - Handle configuration failure:
try {
val service = Sep31Service.fromDomain("anchor.example.org")
} catch (e: Sep31ConfigurationException) {
println("Anchor configuration invalid: ${e.message}")
}See also:
Sep31Exception base class
Parameters
Detailed error message describing the configuration failure.
Optional underlying cause (for example, a TOML fetch failure).