Sep30Exception

open class Sep30Exception(message: String, cause: Throwable? = null) : Exception

Base exception class for SEP-30 Account Recovery errors.

All SEP-30-specific exceptions extend this class to enable unified error handling while providing specific error types for different failure scenarios.

This exception hierarchy maps directly to HTTP status codes returned by recovery servers, allowing applications to handle errors at different levels:

  • Catch Sep30Exception for general SEP-30 error handling

  • Catch specific subclasses for precise error recovery

Common error scenarios:

Example - General error handling:

try {
val account = sep30Service.registerAccount(address, identities, signers)
} catch (e: Sep30UnauthorizedException) {
println("Authentication failed: ${e.message}")
} catch (e: Sep30Exception) {
println("SEP-30 error: ${e.message}")
}

See also:

Inheritors

Constructors

Link copied to clipboard
constructor(message: String, cause: Throwable? = null)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
expect open val message: String?

Functions

Link copied to clipboard
open override fun toString(): String