diff --git a/src/main/java/app/configurations/RestTemplateConfig.java b/src/main/java/app/configurations/RestTemplateConfig.java index a4d8e6c..0f18a67 100644 --- a/src/main/java/app/configurations/RestTemplateConfig.java +++ b/src/main/java/app/configurations/RestTemplateConfig.java @@ -36,7 +36,7 @@ public class RestTemplateConfig { try { String[] proto_address = proxy.split("://"); - String[] address_port = proto_address[0].split(":"); + String[] address_port = proto_address[1].split(":"); int port = Integer.parseInt(address_port[1]); Proxy.Type type; @@ -63,7 +63,7 @@ public class RestTemplateConfig { logger.info("Create RestTemplate instants with proxy {}", proxy); return restTemplate; } catch (IndexOutOfBoundsException | NumberFormatException e) { - logger.error("PROXY_URL is setted but can't be splitted or parsed"); + logger.error("PROXY_URL is setted but can't be splitted or parsed", e); return getRestTemplate(); } }