Skip to content

Commit e212fb4

Browse files
committed
fix(HttpOutput): log and raise error only on response status code in error (upper than 399)
1 parent 3e57229 commit e212fb4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/com/plugin/HttpOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private void executeRequest(RequestBody requestBody) throws HttpOutputException,
168168

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

0 commit comments

Comments
 (0)