diff --git a/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/resource/YTJResource.java b/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/resource/YTJResource.java index 0f4c9b3b9..1c33ffc30 100644 --- a/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/resource/YTJResource.java +++ b/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/resource/YTJResource.java @@ -23,6 +23,7 @@ import fi.vm.sade.organisaatio.ytj.api.exception.YtjConnectionException; import fi.vm.sade.organisaatio.ytj.api.exception.YtjExceptionType; import io.swagger.v3.oas.annotations.Hidden; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.convert.ConversionService; import org.springframework.http.HttpStatus; @@ -35,6 +36,7 @@ @Hidden @RestController +@Slf4j @RequestMapping({"${server.internal.context-path}/ytj", "${server.rest.context-path}/ytj"}) public class YTJResource { @@ -102,6 +104,7 @@ public List doYtjMassSearch(List ytunnuses) { try { ytjListResult = ytjService.findByYTunnusBatch(ytunnuses, YTJKieli.FI); } catch (YtjConnectionException ex) { + log.error("YtjService invocation failed", ex); throw new OrganisaatioResourceException(HttpStatus.BAD_REQUEST, ex.getMessage(), ex.getExceptionType().name()); } return ytjListResult;