orThrow

inline fun <T> ApiResult<T>.orThrow(): T

Throws ApiResult.Error.e, or NotFinishedException if the request has not been completed yet.

See also


fun <T> Flow<ApiResult<T>>.orThrow(): Flow<T>

Maps this flow to an ApiResult.Success value, otherwise throws the resulting error