Skip to content

Commit d340b78

Browse files
committed
fix: reject empty or blank graphKey
1 parent 35dfbd0 commit d340b78

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/sdk/server-ai/src/main/java/com/launchdarkly/sdk/server/ai/AIGraphTracker.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public final class AIGraphTracker {
7272
LDLogger logger) {
7373
this.client = Objects.requireNonNull(client, "client");
7474
this.runId = Objects.requireNonNull(runId, "runId");
75-
this.graphKey = Objects.requireNonNull(graphKey, "graphKey");
75+
Objects.requireNonNull(graphKey, "graphKey");
76+
if (graphKey.trim().isEmpty()) {
77+
throw new IllegalArgumentException("graphKey must not be blank");
78+
}
79+
this.graphKey = graphKey;
7680
this.variationKey = variationKey;
7781
this.version = version;
7882
this.context = Objects.requireNonNull(context, "context");

0 commit comments

Comments
 (0)