Skip to content

Commit

Permalink
OPHYK-416 Log the original exception before obfuscating it
Browse files Browse the repository at this point in the history
  • Loading branch information
tsu committed Dec 27, 2024
1 parent 6f725c8 commit 57040b3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,6 +36,7 @@

@Hidden
@RestController
@Slf4j
@RequestMapping({"${server.internal.context-path}/ytj", "${server.rest.context-path}/ytj"})
public class YTJResource {

Expand Down Expand Up @@ -102,6 +104,7 @@ public List<YTJDTO> doYtjMassSearch(List<String> 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;
Expand Down

0 comments on commit 57040b3

Please sign in to comment.