Sep31TransactionNotFoundException

class Sep31TransactionNotFoundException(message: String, val statusCode: Int = 404, val rawResponseBody: String? = null) : Sep31Exception

Exception thrown when the Receiving Anchor returns HTTP 404 for a transaction lookup.

Raised from GET /transactions/:id and PATCH /transactions/:id when the anchor cannot locate a transaction matching the supplied id. This is distinct from Sep31TransactionCallbackNotSupportedException, which signals that the anchor does not advertise callback support — not that the transaction itself is missing.

Common causes:

  • The transaction id is incorrect or typo'd

  • The transaction was archived by the anchor's retention policy

  • The Sending Anchor and Receiving Anchor are configured with different transaction id namespaces

Recovery actions:

  • Verify the transaction id captured from the original POST /transactions response

  • Contact the Receiving Anchor operator if the id is recent and known-good

Example - Handle not found:

try {
val transaction = sep31Service.getTransaction(id = "11111111-1111-1111-1111-111111111111", jwt = jwt)
} catch (e: Sep31TransactionNotFoundException) {
println("Transaction not found (HTTP ${e.statusCode}): ${e.message}")
}

See also:

Parameters

message

Sanitized error message describing the lookup failure.

Constructors

Link copied to clipboard
constructor(message: String, statusCode: Int = 404, rawResponseBody: String? = null)

Properties

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

Anchor response body for local debugging — see the rawResponseBody convention on Sep31Exception. null when no body was captured.

Link copied to clipboard

The HTTP status code returned by the Receiving Anchor (always 404 for this exception).

Functions

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