harness-community / openfeature-java-provider

Apache License 2.0
0 stars 1 forks source link

OF Requirement 1.1.5 & 1.1.6 #7

Closed scalabl3 closed 1 year ago

scalabl3 commented 1 year ago

https://docs.openfeature.dev/docs/specification/sections/flag-evaluation

Requirement 1.1.5 The API MUST provide a function for creating a client which accepts the following options:

name (optional): A logical string identifier for the client.

// example client creation and retrieval
OpenFeature.getClient({
  name: "my-openfeature-client",
});

The name is a logical identifier for the client.

Requirement 1.1.6 The client creation function MUST NOT throw, or otherwise abnormally terminate.

Clients may be created in critical code paths, and even per-request in server-side HTTP contexts. Therefore, in keeping with the principle that OpenFeature should never cause abnormal execution of the first party application, this function should never throw. Abnormal execution in initialization should instead occur during provider registration.