Skip to content

Commit

Permalink
fix(HttpOutput): log and raise error only on response status code in …
Browse files Browse the repository at this point in the history
…error (upper than 399)
  • Loading branch information
squioc committed Oct 14, 2019
1 parent 3e57229 commit e212fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/plugin/HttpOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void executeRequest(RequestBody requestBody) throws HttpOutputException,

// ensure the response (and underlying response body) is closed
try (Response response = this.httpClient.newCall(request).execute()) {
if (response.code() != 200) {
if (response.code() > 399) {
LOG.info("Unexpected HTTP response status " + response.code());
if (this.raise_exception_on_http_error) {
throw new HttpOutputException("Unexpected HTTP response status " + response.code());
Expand Down

0 comments on commit e212fb4

Please sign in to comment.