diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/config/RestErrorHandler.java b/api/src/main/java/ca/bc/gov/educ/api/trax/config/RestErrorHandler.java index 39fd4f06..1f948717 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/config/RestErrorHandler.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/config/RestErrorHandler.java @@ -71,7 +71,8 @@ protected ResponseEntity handleConflict(RuntimeException ex) { @ExceptionHandler(value = { JpaObjectRetrievalFailureException.class, DataRetrievalFailureException.class, EntityNotFoundException.class }) protected ResponseEntity handleEntityNotFound(RuntimeException ex) { - // no need to log EntityNotFoundExceptions as they are expected + // no need to log EntityNotFoundExceptions as error + // it is used to denote NOT FOUND and is normal part of operations if(!(ex instanceof EntityNotFoundException)){ log.error("JPA ERROR IS: {}", ex.getClass().getName(), ex); }