public UserResponse getById(Long id) {
log.info("Fetching user with id: {}", id);
return userMapper.userToUserResponse(userRepository.findById(id)
.orElseThrow(() -> {
String message = MessageFormat.format("User not found with id: {0}.", id);
log.error(message);
return new EntityNotFoundException(message);
}));
}