diff --git a/kahpp-spring-autoconfigure/src/main/java/dev/vox/platform/kahpp/configuration/http/client/ApiClient.java b/kahpp-spring-autoconfigure/src/main/java/dev/vox/platform/kahpp/configuration/http/client/ApiClient.java index e6ee5c9..08dc041 100644 --- a/kahpp-spring-autoconfigure/src/main/java/dev/vox/platform/kahpp/configuration/http/client/ApiClient.java +++ b/kahpp-spring-autoconfigure/src/main/java/dev/vox/platform/kahpp/configuration/http/client/ApiClient.java @@ -29,9 +29,13 @@ import org.apache.http.impl.conn.SystemDefaultRoutePlanner; import org.apache.http.message.BasicHeader; import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class ApiClient { + private static final Logger LOGGER = LoggerFactory.getLogger(ApiClient.class); + private final HttpClient httpClient; private final String basePath; private final Map defaultHeaders; @@ -59,6 +63,7 @@ private Response executeRequest(final Request request) throws RequestException { try { response = transformHttpResponse(httpClient.execute(httpRequest)); } catch (IOException exception) { + LOGGER.error("Request {} failed because {}", httpRequest, exception.getMessage()); throw new TransferException(exception, request); }