FeatureAlreadyExistsException

Thrown when attempting to create a feature that already exists in the store.

This exception is thrown by FeatureStore.plusAssign() when trying to insert a feature with a UID that is already present in the store. To avoid this exception, either check existence first using FeatureStore.contains() or use the com.yonatankarp.ff4k.core.createOrUpdate extension function.

Example:

// Safe approach using createOrUpdate extension
featureStore.createOrUpdate(feature)

// Or check existence first
if (feature.uid !in featureStore) {
featureStore += feature
}

Parameters

featureId

The unique identifier of the feature that already exists

See also

com.yonatankarp.ff4k.core.createOrUpdate

Constructors

Link copied to clipboard
constructor(featureId: String)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?