Skip to content

Commit

Permalink
chore(client): version release
Browse files Browse the repository at this point in the history
  • Loading branch information
astappiev committed Jan 16, 2024
1 parent 72d4c47 commit c44b9d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion interweb-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</parent>

<artifactId>interweb-client</artifactId>
<version>4.0.7</version>
<version>4.0.8</version>
<packaging>jar</packaging>

<name>Interweb Client</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public <T> T sendGetRequest(final String apiPath, final Map<String, String> para
HttpResponse<String> response = sendRequest(builder);
return mapper.readValue(response.body(), valueType);
} catch (IOException e) {
throw new InterwebException("An error occurred during Interweb request " + apiPath, e);
throw new InterwebException("Failed GET request " + apiPath, e);
}
}

Expand All @@ -149,7 +149,7 @@ public <T> T sendPostRequest(final String apiPath, final Object query, Class<T>
HttpResponse<String> response = sendRequest(builder);
return mapper.readValue(response.body(), valueType);
} catch (IOException e) {
throw new InterwebException("An error occurred during Interweb request " + query, e);
throw new InterwebException("Failed POST request " + query, e);
}
}

Expand All @@ -162,7 +162,7 @@ public HttpResponse<String> sendRequest(final HttpRequest.Builder builder) throw
HttpResponse<String> response = client.send(builder.build(), HttpResponse.BodyHandlers.ofString());

if (response.statusCode() != 200) {
throw new InterwebException("Interweb request failed, response: " + response.body());
throw new InterwebException("Bad response: " + response.statusCode() + ", " + response.body());
}

return response;
Expand Down

0 comments on commit c44b9d9

Please sign in to comment.