From f12d67d5df78bbf437b7558ea85419d323a82479 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Tue, 7 Jun 2022 13:08:12 -0400 Subject: [PATCH] Client creation must not throw --- specification.json | 7 +++++++ specification/flag-evaluation/flag-evaluation.md | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/specification.json b/specification.json index d28f4e70..4ec7a767 100644 --- a/specification.json +++ b/specification.json @@ -35,6 +35,13 @@ "RFC 2119 keyword": "MUST", "children": [] }, + { + "id": "Requirement 1.1.6", + "machine_id": "requirement_1_1_6", + "content": "The client creation function MUST NOT throw, or otherwise abnormally terminate.", + "RFC 2119 keyword": "MUST NOT", + "children": [] + }, { "id": "Requirement 1.2.1", "machine_id": "requirement_1_2_1", diff --git a/specification/flag-evaluation/flag-evaluation.md b/specification/flag-evaluation/flag-evaluation.md index 80a464ae..be507b4c 100644 --- a/specification/flag-evaluation/flag-evaluation.md +++ b/specification/flag-evaluation/flag-evaluation.md @@ -62,6 +62,12 @@ OpenFeature.getClient({ 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. Therefor, 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. + ### Client Usage #### Requirement 1.2.1