I have several methods which return IObservable. In all cases I set up a query which will cause the returned observable to complete. Generally I've been using the TakeUntil extension method. The observable type I'm using in the TakeUntil contains a flag that tells me if there has been a problem. How could I use this to cause my returned observable to end in error? I would love a TakeUntil overload that allowed the observable to end in error.
Currently I have hacked the method to return a subject which has subscribed to the query observable and also subscribed to other observable that I use in TakeUntil to either call OnCompleted or OnError. I realise this a bad plan but what should I be doing? Any help much appreciated.