public void error(String invalidExtensionName, String errorMessage) {
        if (Objects.requireNonNull(invalidExtensionName).isEmpty())
            throw new IllegalArgumentException("extension name must not be empty");
        this.invalidExtensions.put(invalidExtensionName, errorMessage);
    }
Set the error value for a specific extension key-value pair if validation has failed

@param invalidExtensionName
           the mandatory extension name which caused the validation failure
@param errorMessage
           error message describing why the validation failed
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/OAuthBearerExtensionsValidatorCallback.java