diff --git a/offchain/advance-runner/src/server_manager/facade.rs b/offchain/advance-runner/src/server_manager/facade.rs index 9649b7054..872d3cf6d 100644 --- a/offchain/advance-runner/src/server_manager/facade.rs +++ b/offchain/advance-runner/src/server_manager/facade.rs @@ -199,21 +199,22 @@ impl ServerManagerFacade { } }); - // Capture advance-state error + // Capture server-manager error for advance-state request + // to try to get the reason for a possible tainted session error. if response.is_err() { let sm_error = response.unwrap_err(); - // The server-manager does not inform the reason for a tainted session. match sm_error { ServerManagerError::MethodCallError { method: _, request_id: _, source, } => { + // Original error message to be reported by default. let mut message = source.message().to_string(); - // The server-manager signals with Code::Dataloss when the session has been previously tainted. + // The server-manager signals with code Dataloss when the session has been previously tainted. if source.code() == tonic::Code::DataLoss { - // Trying to recover it from the session's status. - // If not available, we inform the original status error message. + // Trying to recover the tainted session reason from the session's status. + // If not available, we log the original error message. let status_response = grpc_call!( self, get_session_status,