Hi, I’m in the process of getting familiar with the jvm-client db-client-java:3.0.0. Got a question regarding the error handling in a CatchUpSubscription. Given this code snippet:
client.subscribeToStream(
streamName,
new SubscriptionListener {
override def onEvent(subscription: Subscription, event: ResolvedEvent): Unit = {
throw new Exception("just for testing")
}
override def onError(subscription: Subscription, throwable: Throwable): Unit = {
println(throwable.getMessage)
}
override def onCancelled(subscription: Subscription): Unit = {
println("subscription cancelled")
}
},
SubscribeToStreamOptions.get()
.fromStart()
.resolveLinkTos()
)
I see that when the subscription receives an event and the onError is called, and throws an Exception - the next step I would assume to happen is that onError would be called. But this is not the case. Instead it only calls the onCancelled. What is actually the expected behaviour here?