Skip to content

Commit aa33e3a

Browse files
committed
revert elasticsearch exception changes
1 parent 71f2500 commit aa33e3a

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
package co.elastic.clients.elasticsearch._types;
2121

22-
import co.elastic.clients.transport.http.TransportHttpClient;
23-
2422
import javax.annotation.Nullable;
2523

2624
/**
@@ -35,19 +33,11 @@ public class ElasticsearchException extends RuntimeException {
3533

3634
private final ErrorResponse response;
3735
private final String endpointId;
38-
@Nullable
39-
private final TransportHttpClient.Response httpResponse;
4036

41-
public ElasticsearchException(String endpointId, ErrorResponse response,
42-
@Nullable TransportHttpClient.Response httpResponse) {
37+
public ElasticsearchException(String endpointId, ErrorResponse response) {
4338
super("[" + endpointId + "] failed: [" + response.error().type() + "] " + response.error().reason());
4439
this.response = response;
4540
this.endpointId = endpointId;
46-
this.httpResponse = httpResponse;
47-
}
48-
49-
public ElasticsearchException(String endpointId, ErrorResponse response) {
50-
this(endpointId, response, null);
5141
}
5242

5343
/**
@@ -78,12 +68,4 @@ public ErrorCause error() {
7868
public int status() {
7969
return this.response.status();
8070
}
81-
82-
/**
83-
* The underlying http response, if available.
84-
*/
85-
@Nullable
86-
public TransportHttpClient.Response httpResponse() {
87-
return this.httpResponse;
88-
}
8971
}

0 commit comments

Comments
 (0)