mirror of
https://github.com/corda/corda.git
synced 2025-02-25 19:11:45 +00:00
Logging flow name instead of flow id at VaultService.rawUpdates subscribing error
This commit is contained in:
parent
0fb49e9ed2
commit
9a2daeb5c9
@ -749,7 +749,11 @@ class VaultObserverExceptionTest {
|
|||||||
|
|
||||||
val flowHandle = aliceNode.rpc.startFlow(ErrorHandling::SubscribingRawUpdatesFlow)
|
val flowHandle = aliceNode.rpc.startFlow(ErrorHandling::SubscribingRawUpdatesFlow)
|
||||||
|
|
||||||
assertFailsWith<CordaRuntimeException>("Flow ${flowHandle.id} tried to subscribe an Rx.Observer to VaultService.rawUpdates - the subscription did not succeed ") {
|
assertFailsWith<CordaRuntimeException>(
|
||||||
|
"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)
|
flowHandle.returnValue.getOrThrow(30.seconds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,13 +218,15 @@ class NodeVaultService(
|
|||||||
// it could prevent the flow/ fiber -object- get garbage collected.
|
// it could prevent the flow/ fiber -object- get garbage collected.
|
||||||
return PreventSubscriptionsSubject(_rawUpdatesPublisher) {
|
return PreventSubscriptionsSubject(_rawUpdatesPublisher) {
|
||||||
log.error(
|
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 " +
|
"- the subscription did not succeed " +
|
||||||
"- aborting the flow "
|
"- aborting the flow "
|
||||||
)
|
)
|
||||||
|
|
||||||
throw FlowException(
|
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 "
|
"- the subscription did not succeed "
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user