Skip to content

Commit 55b212c

Browse files
swallezFuudphilkra
authored
Fix for exception self-suppression in Rest client (#83568) (#84580)
Co-authored-by: Philip Krauss <[email protected]> Co-authored-by: Fedor Bobin <[email protected]> Co-authored-by: Philip Krauss <[email protected]>
1 parent 30bcc75 commit 55b212c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

client/rest/src/main/java/org/elasticsearch/client/RestClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ private static boolean isRetryStatus(int statusCode) {
574574
}
575575

576576
private static void addSuppressedException(Exception suppressedException, Exception currentException) {
577-
if (suppressedException != null) {
577+
if (suppressedException != null && suppressedException != currentException) {
578578
currentException.addSuppressed(suppressedException);
579579
}
580580
}

docs/changelog/83568.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 83568
2+
summary: Fix for self-suppression in rest client
3+
area: Client
4+
type: bug
5+
issues:
6+
- 42223

0 commit comments

Comments
 (0)