@Override
    public int hashCode() {
        return Objects.hash(isFault,
                causesFailover,
                internalException.getClass().getCanonicalName(),
                internalException.getMessage(),
                externalException.orElse(internalException).getClass().getCanonicalName(),
                externalException.orElse(internalException).getMessage());
    }
Returns true if the class and message fields match for two exceptions. Handles nulls.
metadata/src/main/java/org/apache/kafka/controller/errors/EventHandlerExceptionInfo.java