Skip to content

Commit

Permalink
update version to 1.2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
wicked_tc130 committed Feb 22, 2024
1 parent 9510200 commit 6b042a3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>cn.jpush.api</groupId>
<artifactId>jiguang-common</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<packaging>jar</packaging>
<url>https://github.com/jpush/jiguang-java-client-common</url>
<name>Jiguang Client Common Dependencies</name>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/cn/jiguang/common/connection/ApacheHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -463,32 +463,32 @@ public void processResponse(CloseableHttpResponse response, ResponseWrapper wrap
wrapper.setErrorObject();
break;
case 401:
LOG.error("Authentication failed! Please check authentication params according to docs.");
LOG.warn("Authentication failed! Please check authentication params according to docs.");
wrapper.setErrorObject();
break;
case 403:
LOG.error("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
LOG.warn("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
wrapper.setErrorObject();
break;
case 404:
LOG.error("Request page is not found! Maybe your params is invalid.");
LOG.warn("Request page is not found! Maybe your params is invalid.");
wrapper.setErrorObject();
break;
case 410:
LOG.error("Request resource is no longer in service. Please according to notice on official website.");
LOG.warn("Request resource is no longer in service. Please according to notice on official website.");
wrapper.setErrorObject();
case 429:
LOG.error("Too many requests! Please review your appkey's request quota.");
LOG.warn("Too many requests! Please review your appkey's request quota.");
wrapper.setErrorObject();
break;
case 500:
case 502:
case 503:
case 504:
LOG.error("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
LOG.warn("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
break;
default:
LOG.error("Unexpected response.");
LOG.warn("Unexpected response.");
}

throw new APIRequestException(wrapper);
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/cn/jiguang/common/connection/Http2Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,32 +129,32 @@ public void handleResponse(ResponseWrapper wrapper, Request request) throws IOEx
wrapper.setErrorObject();
break;
case 401:
LOG.error("Authentication failed! Please check authentication params according to docs.");
LOG.warn("Authentication failed! Please check authentication params according to docs.");
wrapper.setErrorObject();
break;
case 403:
LOG.error("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
LOG.warn("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
wrapper.setErrorObject();
break;
case 404:
LOG.error("Request page is not found! Maybe your params is invalid.");
LOG.warn("Request page is not found! Maybe your params is invalid.");
wrapper.setErrorObject();
break;
case 410:
LOG.error("Request resource is no longer in service. Please according to notice on official website.");
LOG.warn("Request resource is no longer in service. Please according to notice on official website.");
wrapper.setErrorObject();
case 429:
LOG.error("Too many requests! Please review your appkey's request quota.");
LOG.warn("Too many requests! Please review your appkey's request quota.");
wrapper.setErrorObject();
break;
case 500:
case 502:
case 503:
case 504:
LOG.error("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
LOG.warn("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
break;
default:
LOG.error("Unexpected response.");
LOG.warn("Unexpected response.");
}
}
LOG.warn("Got error response - response: " + response.body().string());
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/cn/jiguang/common/connection/NativeHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,32 +201,32 @@ private ResponseWrapper _doRequest(String url, String content,
wrapper.setErrorObject();
break;
case 401:
LOG.error("Authentication failed! Please check authentication params according to docs.");
LOG.warn("Authentication failed! Please check authentication params according to docs.");
wrapper.setErrorObject();
break;
case 403:
LOG.error("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
LOG.warn("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
wrapper.setErrorObject();
break;
case 404:
LOG.error("Request page is not found! Maybe your params is invalid.");
LOG.warn("Request page is not found! Maybe your params is invalid.");
wrapper.setErrorObject();
break;
case 410:
LOG.error("Request resource is no longer in service. Please according to notice on official website.");
LOG.warn("Request resource is no longer in service. Please according to notice on official website.");
wrapper.setErrorObject();
case 429:
LOG.error("Too many requests! Please review your appkey's request quota.");
LOG.warn("Too many requests! Please review your appkey's request quota.");
wrapper.setErrorObject();
break;
case 500:
case 502:
case 503:
case 504:
LOG.error("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
LOG.warn("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
break;
default:
LOG.error("Unexpected response.");
LOG.warn("Unexpected response.");
}

throw new APIRequestException(wrapper);
Expand All @@ -250,7 +250,7 @@ private ResponseWrapper _doRequest(String url, String content,
try {
out.close();
} catch (IOException e) {
LOG.error("Failed to close stream.", e);
LOG.warn("Failed to close stream.", e);
}
}
if (null != conn) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/cn/jiguang/common/connection/NettyHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,32 +208,32 @@ private ResponseWrapper sendHttpRequest(HttpMethod method, String url, String bo
wrapper.setErrorObject();
break;
case 401:
LOG.error("Authentication failed! Please check authentication params according to docs.");
LOG.warn("Authentication failed! Please check authentication params according to docs.");
wrapper.setErrorObject();
break;
case 403:
LOG.error("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
LOG.warn("Request is forbidden! Maybe your appkey is listed in blacklist or your params is invalid.");
wrapper.setErrorObject();
break;
case 404:
LOG.error("Request page is not found! Maybe your params is invalid.");
LOG.warn("Request page is not found! Maybe your params is invalid.");
wrapper.setErrorObject();
break;
case 410:
LOG.error("Request resource is no longer in service. Please according to notice on official website.");
LOG.warn("Request resource is no longer in service. Please according to notice on official website.");
wrapper.setErrorObject();
case 429:
LOG.error("Too many requests! Please review your appkey's request quota.");
LOG.warn("Too many requests! Please review your appkey's request quota.");
wrapper.setErrorObject();
break;
case 500:
case 502:
case 503:
case 504:
LOG.error("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
LOG.warn("Seems encountered server error. Maybe JPush is in maintenance? Please retry later.");
break;
default:
LOG.error("Unexpected response.");
LOG.warn("Unexpected response.");
}
throw new APIRequestException(wrapper);
}
Expand Down

0 comments on commit 6b042a3

Please sign in to comment.