THRIFT-4773: Provide root cause for sasl negotiation failure
Client: java
The error for sasl negotiation failure dropped the root cause, which makes troubleshooting sometimes difficult.
diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
index bed3b39..c858425 100644
--- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
@@ -317,7 +317,7 @@
if (!readSaslHeader && e.getType() == TTransportException.END_OF_FILE) {
underlyingTransport.close();
LOGGER.debug("No data or no sasl data in the stream");
- throw new TSaslTransportException("No data or no sasl data in the stream");
+ throw new TSaslTransportException("No data or no sasl data in the stream during negotiation", e);
}
throw e;
}