Catch error when an item is not found
Currently, when you try to call a non-existing items, non-existing versions of an item or not (more) existing draft items, this raises an error in the logfiles, here are some of these errors:
ERROR e.s.m.c.MarketplaceExceptionHandler.handleEntityNotFoundException - No entity
javax.persistence.EntityNotFoundException: Unable to find eu.sshopencloud.marketplace.model.tools.Tool with id AOHiq8 and version id 407023
at eu.sshopencloud.marketplace.services.items.ItemVersionService.lambda$loadItemVersion$5(ItemVersionService.java:155)
ERROR e.s.m.c.MarketplaceExceptionHandler.handleEntityNotFoundException - No entity
javax.persistence.EntityNotFoundException: Unable to find draft eu.sshopencloud.marketplace.model.publications.Publication with id C2BbdX for the authorized user
at eu.sshopencloud.marketplace.services.items.ItemVersionService.lambda$loadItemDraftForCurrentUser$2(ItemVersionService.java:124)
At least the last error is raised quite often, as frontend needs to look for a possible draft verison of an item if a logged user edits an item. The "no entity" information is interesting but I wouldn't qualify it as an error.
@ekalata Do you think you could catch these errors and instead of raising an error with the full callback debug information give only a simple INFO line in the logfiles (e.g. the "Unable to find [category] with id [persistent_id] and version id [version_id]" not as exception but as info line)?