ExchangeException

open class ExchangeException(val code: String, val message: String, val context: Map<String, Any?> = emptyMap(), val cause: Throwable? = null) : TrustWeaveException

Base exception class for all credential exchange protocol errors.

All exchange-related exceptions extend this class, which extends TrustWeaveException. This provides a consistent error handling structure across all exchange protocols.

Inheritors

Constructors

Link copied to clipboard
constructor(code: String, message: String, context: Map<String, Any?> = emptyMap(), cause: Throwable? = null)

Types

Link copied to clipboard
data class InvalidRequest(val field: String, val reason: String, val protocolName: String? = null, val cause: Throwable? = null) : ExchangeException

Invalid request error.

Link copied to clipboard
data class MessageNotFound(val messageId: String, val protocolName: String? = null) : ExchangeException

Message not found error.

Link copied to clipboard
data class MissingRequiredOption(val optionName: String, val protocolName: String? = null) : ExchangeException

Missing required option error.

Link copied to clipboard
data class OfferNotFound(val offerId: String, val protocolName: String? = null) : ExchangeException

Offer not found error.

Link copied to clipboard
data class OperationNotSupported(val protocolName: String, val operation: String, val supportedOperations: List<String> = emptyList()) : ExchangeException

Operation not supported error.

Link copied to clipboard
data class ProofRequestNotFound(val requestId: String, val protocolName: String? = null) : ExchangeException

Proof request not found error.

Link copied to clipboard
data class ProtocolNotRegistered(val protocolName: String, val availableProtocols: List<String> = emptyList()) : ExchangeException

Protocol not registered error.

Link copied to clipboard
data class RequestNotFound(val requestId: String, val protocolName: String? = null) : ExchangeException

Request not found error.

Link copied to clipboard
data class Unknown(val reason: String, val errorType: String? = null, val cause: Throwable? = null) : ExchangeException

Unknown error.

Properties

Link copied to clipboard
open override val cause: Throwable?
Link copied to clipboard
open override val code: String
Link copied to clipboard
open override val context: Map<String, Any?>
Link copied to clipboard
open override val message: String