Sep30UnknownResponseException

class Sep30UnknownResponseException(val statusCode: Int, val responseBody: String, message: String) : Sep30Exception

Exception thrown when the recovery server returns an unexpected HTTP status code.

Indicates that the server responded with an HTTP status code not covered by the SEP-30 specification (i.e., not 200, 400, 401, 404, or 409). This may occur when:

  • The server encounters an internal error (HTTP 500)

  • The server is temporarily unavailable (HTTP 503)

  • A proxy or gateway returns an error (HTTP 502, 504)

  • The server returns any other unexpected status code

Recovery actions:

  • Inspect statusCode and responseBody for diagnostic information

  • Retry the request if the error appears transient (5xx)

  • Contact the recovery server operator if the problem persists

Example - Handle unknown response:

try {
val account = sep30Service.registerAccount(address, identities, signers)
} catch (e: Sep30UnknownResponseException) {
println("Unexpected HTTP ${e.statusCode}: ${e.responseBody}")
}

See also:

Parameters

message

Detailed error message describing the unexpected response

Constructors

Link copied to clipboard
constructor(statusCode: Int, responseBody: String, message: String)

Properties

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

The raw response body returned by the recovery server

Link copied to clipboard

The HTTP status code returned by the recovery server

Functions

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