Categories
ios rx-swift swift

RxSwift: Return a new observable with an error

I have a function that return a Bool Observable depending if it was ok or not.

func test() -> Observable<Bool> {
if everythingIsOk {
return just(true)
}
return just(false) <- how can i here return a custom error to retrieve what failed?
}