Skip to content

Commit

Permalink
Cleaning up code
Browse files Browse the repository at this point in the history
  • Loading branch information
chris.ditcher authored and chris.ditcher committed Sep 9, 2024
1 parent 4103ba2 commit 45c9372
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ protected ResponseEntity<Object> handleConflict(RuntimeException ex) {

@ExceptionHandler(value = { JpaObjectRetrievalFailureException.class, DataRetrievalFailureException.class, EntityNotFoundException.class })
protected ResponseEntity<Object> 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);
}
Expand Down

0 comments on commit 45c9372

Please sign in to comment.