Error

data class Error<out T>(val exception: Exception, val data: T? = null) : TWSOutcome<T>

Represents an error state when the API call fails.

Parameters

exception

The exception that occurred during the API call.

data

The last available data, if any, before the failure.

Constructors

Link copied to clipboard
constructor(exception: Exception, data: T? = null)

Properties

Link copied to clipboard
open override val data: T? = null
Link copied to clipboard

Functions

Link copied to clipboard
fun <A, B> TWSOutcome<A>.mapData(mapper: (A) -> B): TWSOutcome<B>

Map data of this outcome, while keeping the type.