This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch rel/1.0
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.0 by this push:
     new 2cd1beaadf [To rel/1.0][IOTDB-5061] Add message in RatisRequestFailed  
(#8895)
2cd1beaadf is described below

commit 2cd1beaadfa83c2c2512d17936e9862fb06793be
Author: William Song <[email protected]>
AuthorDate: Wed Jan 18 15:21:00 2023 +0800

    [To rel/1.0][IOTDB-5061] Add message in RatisRequestFailed  (#8895)
---
 .../iotdb/consensus/exception/RatisRequestFailedException.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java
 
b/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java
index 74291a47ae..0a45ea9a34 100644
--- 
a/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java
+++ 
b/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java
@@ -18,9 +18,14 @@
  */
 package org.apache.iotdb.consensus.exception;
 
+import java.util.Optional;
+
 public class RatisRequestFailedException extends ConsensusException {
 
   public RatisRequestFailedException(Exception cause) {
-    super("Ratis request failed", cause);
+    super(
+        "Ratis request failed "
+            + 
Optional.ofNullable(cause).map(Exception::getMessage).orElse("Unknown"),
+        cause);
   }
 }

Reply via email to