Skip to content

Commit 28ecfed

Browse files
authored
Merge pull request #55 from exceptionless/small-fix
Small fix
2 parents b63731c + fa3d659 commit 28ecfed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/exceptionless/exceptionlessclient/settings/DefaultSettingsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public SettingsResponse getSettings(long version) {
5151
if (bodyStr == null) {
5252
return SettingsResponse.builder().code(response.code()).body("").build();
5353
}
54-
if (response.code() / 100 != 2) {
54+
if (!response.isSuccessful()) {
5555
return SettingsResponse.builder().code(response.code()).body(bodyStr).build();
5656
}
5757

src/main/java/com/exceptionless/exceptionlessclient/submission/DefaultSubmissionClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private SubmissionResponse postSubmission(String url, Object data) {
7373

7474
Response response = httpClient.newCall(request).execute();
7575

76-
if (response.code() / 100 == 2) {
76+
if (response.isSuccessful()) {
7777
updateSettingsFromHeaders(response.headers());
7878
}
7979

@@ -114,7 +114,7 @@ public void sendHeartBeat(String sessionIdOrUserId, boolean closeSession) {
114114

115115
Response response = httpClient.newCall(request).execute();
116116

117-
if (response.code() / 100 != 2) {
117+
if (!response.isSuccessful()) {
118118
log.error(
119119
String.format(
120120
"Error in submitting heartbeat to the server for sessionOrUserId: %s",

0 commit comments

Comments
 (0)