code: public static List<Audit> findByMessage(EntityManager em, String message) {
          requireArgument(em != null, "Entity manager cannot be null.");
          requireArgument(message != null && !message.isEmpty(), "Message cannot be null or empty.");
  
          TypedQuery<Audit> query = em.createNamedQuery("Audit.findByMessage", Audit.class);
  
          try {
              query.setParameter("message", "%" + message + "%");
              return query.getResultList();
          } catch (Exception ex) {
              return new ArrayList<Audit>(0);
          }
      }
docs: Finds audits by exception message.
  
  @param   em       The entity manager. Cannot be null.
  @param   message  The exception/error message.
  
  @return  All audits whose error message matches with given error message.