DappException

class DappException(val errorCode: DappErrorCode, message: String, val data: JsonElement? = null, cause: Throwable? = null) : RuntimeException

A CIP-0103 error, thrown by DappClient when the wallet returns one and by the wallet-side engine to produce one.

data carries the optional JSON-RPC error.data unchanged, so a caller can surface a participant traceId without this SDK having to model every shape a wallet might attach.

Constructors

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

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val code: Int

The numeric wire code, for callers that branch on it directly.

Link copied to clipboard
val data: JsonElement?

The JSON-RPC error.data, unchanged, if the wallet attached any.

Link copied to clipboard

Which CIP-0103 error this is.

Link copied to clipboard

True when the user declined — the one error a dApp should never retry.

Link copied to clipboard
Link copied to clipboard
open val message: String?
Link copied to clipboard
Link copied to clipboard

Functions

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