Hey guys,
I've implemented my on OnSubscribe function that wraps a Astyanax iterator and emits Observables. This works well, however, if the user issues a query that has no results, my subscription immediately emits .onCompleted(). When doing this, it throws an exception below.
java.lang.IllegalArgumentException: Sequence contains no elements
at rx.operators.OperationSingle$1$1.onCompleted(OperationSingle.java:64)
at rx.Observable$28.onCompleted(Observable.java:7002)
Here is the link to my source.
Given that there may be no matches in Cassandra, is it possible to avoid this issue?