From 6c682612ab86cdb898761f3b8ead2597b3f2cc4c Mon Sep 17 00:00:00 2001 From: Andrew Parmet Date: Wed, 29 May 2024 22:53:48 -0400 Subject: [PATCH] replicate ISE Signed-off-by: Andrew Parmet --- .../org/opensearch/client/transport/aws/AwsSdk2Transport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index 26461a8303..f2db2bb7de 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -212,7 +212,7 @@ public ResponseT performRequest( if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } - throw new IOException(e); + throw new IllegalStateException("unexpected exception type: must be either RuntimeException or IOException", cause); } catch (InterruptedException e) { throw new IOException("HttpRequest was interrupted", e); }