Added more detailed logging for SSLHandshakeException (#1602)

* Added more detailed logging for SSLHandshakeException

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Fixed spotless errors for logging change

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Changed message to include original error and limited to specific instance

Signed-off-by: Ryan Bogan <rbogan@amazon.com>

* Applied troubleshooting message to all instances of SSlHandshakeException

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
This commit is contained in:
Ryan Bogan 2021-12-06 08:05:28 -05:00 committed by GitHub
parent 4db97aa470
commit 7496f8058b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -912,7 +912,9 @@ public class RestClient implements Closeable {
return e;
}
if (exception instanceof SSLHandshakeException) {
SSLHandshakeException e = new SSLHandshakeException(exception.getMessage());
SSLHandshakeException e = new SSLHandshakeException(
exception.getMessage() + "\nSee https://opensearch.org/docs/latest/clients/java-rest-high-level/ for troubleshooting."
);
e.initCause(exception);
return e;
}