Skip to content

Commit bd5e16f

Browse files
author
arnett, stu
committed
v2.0.4
1 parent e83f4d8 commit bd5e16f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/emc/rest/smart/SmartFilter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ public ClientResponse handle(ClientRequest request) throws ClientHandlerExceptio
7575
ClientResponse response = getNext().handle(request);
7676

7777
// capture request stats
78-
host.callComplete(false);
78+
if (response.getStatus() >= 500 && response.getStatus() != 501) {
79+
// except for 501 (not implemented), all 50x responses are considered server errors
80+
host.callComplete(true);
81+
} else {
82+
host.callComplete(false);
83+
}
7984

8085
// wrap the input stream so we can capture the actual connection close
8186
response.setEntityInputStream(new WrappedInputStream(response.getEntityInputStream(), host));

0 commit comments

Comments
 (0)