diff --git a/node/src/integration-test/kotlin/net/corda/node/services/vault/VaultObserverExceptionTest.kt b/node/src/integration-test/kotlin/net/corda/node/services/vault/VaultObserverExceptionTest.kt index 8a65c90c2d..b5815de0c6 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/vault/VaultObserverExceptionTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/vault/VaultObserverExceptionTest.kt @@ -749,7 +749,11 @@ class VaultObserverExceptionTest { val flowHandle = aliceNode.rpc.startFlow(ErrorHandling::SubscribingRawUpdatesFlow) - assertFailsWith("Flow ${flowHandle.id} tried to subscribe an Rx.Observer to VaultService.rawUpdates - the subscription did not succeed ") { + assertFailsWith( + "Flow ${ErrorHandling.SubscribingRawUpdatesFlow::class.java.name} tried to subscribe an Rx.Observer to VaultService.rawUpdates " + + "- Rx.Observables should only be subscribed outside the context of a flow " + + "- the subscription did not succeed " + ) { flowHandle.returnValue.getOrThrow(30.seconds) } } diff --git a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt index e3f753b613..973ca5ba18 100644 --- a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt +++ b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt @@ -218,13 +218,15 @@ class NodeVaultService( // it could prevent the flow/ fiber -object- get garbage collected. return PreventSubscriptionsSubject(_rawUpdatesPublisher) { log.error( - "Flow ${it.id} tried to subscribe an Rx.Observer to VaultService.rawUpdates " + + "Flow ${it.logic::class.java.name} tried to subscribe an Rx.Observer to VaultService.rawUpdates " + + "- Rx.Observables should only be subscribed outside the context of a flow " + "- the subscription did not succeed " + "- aborting the flow " ) throw FlowException( - "Flow ${it.id} tried to subscribe an Rx.Observer to VaultService.rawUpdates " + + "Flow ${it.logic::class.java.name} tried to subscribe an Rx.Observer to VaultService.rawUpdates " + + "- Rx.Observables should only be subscribed outside the context of a flow " + "- the subscription did not succeed " ) }