Skip to content

Commit

Permalink
Update HttpClientUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPeck authored Mar 6, 2024
1 parent cf9855a commit 95f40ea
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ public static HttpResponse simplePost(String uri, HttpClient client, StringEntit
try {
return client.execute(post, buildHttpClientContext());
} catch (IOException ex) {
ex.printStackTrace();
logger.error("simplePost()", ex);
logger.error("simplePost() Exception: {}, cannot get response by POST from url: {}", ex.getMessage(), uri);
throw new ApplicationException("Inner problem, please contact system admin and check the server log");
}
Expand All @@ -245,6 +247,8 @@ public static InputStream simplePost(String uri, StringEntity requestBody, HttpC
try {
return response.getEntity().getContent();
} catch (IOException ex) {
ex.printStackTrace();
logger.error("simplePost()", ex);
logger.error("simplePost() cannot get content by POST from url: {} - " + ex.getLocalizedMessage(), uri);
throw new ApplicationException("Inner problem, please contact system admin and check the server log");
}
Expand Down

0 comments on commit 95f40ea

Please sign in to comment.