failure
Creates a new SubscriptionState with the SubscriptionStatus.Failure status.
Parameters
error
The error to be stored in the state.
errorUpdatedAt
The timestamp when the error was updated. Default is the current epoch.
fun <T> failure(error: Throwable, errorUpdatedAt: Long = epoch(), data: T, dataUpdatedAt: Long = epoch()): SubscriptionState<T>
Creates a new SubscriptionState with the SubscriptionStatus.Failure status.
Parameters
error
The error to be stored in the state.
errorUpdatedAt
The timestamp when the error was updated. Default is the current epoch.
data
The data to be stored in the state.
dataUpdatedAt
The timestamp when the data was updated. Default is the current epoch.