From d5d46c674dda89332520b019c3fbf8ef7371fa48 Mon Sep 17 00:00:00 2001 From: Andrius Dagys Date: Wed, 13 Jun 2018 09:04:05 +0100 Subject: [PATCH] CORDA-1494: Minor - improve error message when max retries reached for notarisation (#3355) --- .../corda/node/services/statemachine/StaffedFlowHospital.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StaffedFlowHospital.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StaffedFlowHospital.kt index 4228a73367..0a2e70ce6f 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StaffedFlowHospital.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StaffedFlowHospital.kt @@ -206,7 +206,11 @@ class StaffedFlowHospital { if (history.notDischargedForTheSameThingMoreThan(newError.maxRetries, this)) { return Diagnosis.DISCHARGE } else { - log.warn("\"Maximum number of retries reached for timed flow ${flowFiber.javaClass}") + val errorMsg = "Maximum number of retries reached for flow ${flowFiber.snapshot().flowLogic.javaClass}." + + "If the flow involves notarising a transaction, this usually means that the notary is being overloaded and" + + "unable to service requests fast enough. Please try again later." + newError.setMessage(errorMsg) + log.warn(errorMsg) } } return Diagnosis.NOT_MY_SPECIALTY