errorOnNull

inline fun <T : Any> ApiResult<T?>?.errorOnNull(exception: () -> Exception = { ConditionNotSatisfiedException("Value was null") }): ApiResult<T>

Make this result an Error if Success value was null.

See also