diff --git a/mod-di-converter-storage-server/src/main/java/org/folio/services/importprofile/ProfileImportServiceImpl.java b/mod-di-converter-storage-server/src/main/java/org/folio/services/importprofile/ProfileImportServiceImpl.java index b0ce3fa..796295c 100644 --- a/mod-di-converter-storage-server/src/main/java/org/folio/services/importprofile/ProfileImportServiceImpl.java +++ b/mod-di-converter-storage-server/src/main/java/org/folio/services/importprofile/ProfileImportServiceImpl.java @@ -74,9 +74,11 @@ public ProfileImportServiceImpl(@Autowired ProfileSnapshotService profileSnapsho @Override public Future importProfile(ProfileSnapshotWrapper profileSnapshot, String tenantId, OkapiConnectionParams okapiParams) { if (profileSnapshot.getContentType() != JOB_PROFILE) { - return Future.failedFuture(new BadRequestException(String.format(PROFILE_SNAPSHOT_INVALID_TYPE, - profileSnapshot.getContentType(), JOB_PROFILE))); + String errorMessage = String.format(PROFILE_SNAPSHOT_INVALID_TYPE, profileSnapshot.getContentType(), JOB_PROFILE); + LOGGER.warn("importProfile:: {}", errorMessage); + return Future.failedFuture(new BadRequestException(errorMessage)); } + LOGGER.info("importProfile:: Started import for Job Profile with id {}", profileSnapshot.getProfileId()); convertProfileSnapshotWrapperContent(profileSnapshot); @@ -152,6 +154,7 @@ private Future saveProfile(OkapiConnectionParams okapiParams, D pro return profileService.getProfileById(profileId, false, okapiParams.getTenantId()) .compose(optionalProfile -> { if (optionalProfile.isPresent()) { + LOGGER.debug("saveProfile:: Overlay profile with id {} during import", profileId); return profileService.updateProfile(profileUpdateDto, okapiParams); } return profileService.saveProfile(profileUpdateDto, okapiParams);