private void validateIfNoneMatch(String etag) {
        // If-None-Match used with the * value can be used to save a file not known to exist,
        // guaranteeing that another upload didn't happen before
        if (ifNoneMatchTags == null) {
            throw createIfNoneMatchException(etag, "Resource already exists");
        }

        // if-non-match matches the etag
        if (ifNoneMatchTags.contains(etag)) {
            throw createIfNoneMatchException(etag, "if-none-match condition is failed for etag: " + etag);
        }
    }
Http method, e.g. GET, PUT, POST and etc
storage/src/main/java/com/epam/aidial/core/storage/util/EtagHeader.java