Skip to content

Commit

Permalink
Improvement for opendistro-for-elasticsearch opendistro-for-elasticse…
Browse files Browse the repository at this point in the history
…arch#49

Reststatus.Created for WebHook-Response is also acceptable
  • Loading branch information
mathewlsm authored May 8, 2019
1 parent 488d63d commit 9823052
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public String getResponseString(CloseableHttpResponse response) throws IOExcepti
private void validateResponseStatus(HttpResponse response) throws IOException {
int statusCode = response.getStatusLine().getStatusCode();

if (statusCode != RestStatus.OK.getStatus()) {
if (!(statusCode == RestStatus.OK.getStatus() || statusCode == RestStatus.CREATED.getStatus())) {
throw new IOException("Failed: " + response);
}
}
Expand Down

0 comments on commit 9823052

Please sign in to comment.