NetworkException

class NetworkException(val errorCode: ErrorCode, message: String? = null, cause: Throwable? = null, val metadata: Map<String, Any> = emptyMap()) : UfcException(source)

Exception for network-related errors.

Constructors

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

Properties

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

The error code

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

Additional metadata (key-value pairs)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> getMeta(key: String): T?

Retrieves a value from metadata for a specific key.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun withMeta(newMetadata: Map<String, Any>): UfcException

Creates a new UfcException with multiple additional metadata entries.

fun withMeta(key: String, value: Any): UfcException

Creates a new UfcException with an additional metadata entry.