Skip to content

Commit

Permalink
Added more detailed logging for SSLHandshakeException (#1602)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ryanbogan authored Dec 6, 2021
1 parent 4db97aa commit 7496f80
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ private static Exception extractAndWrapCause(Exception exception) {
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;
}
Expand Down

0 comments on commit 7496f80

Please sign in to comment.