Skip to content

Commit 31da456

Browse files
authored
fix: minor corrections around FATAL state (#247)
No substantial changes here, just editorial improvements and corrections. When implementing #241, I noticed a few oversights (see comments). Signed-off-by: Todd Baert <[email protected]>
1 parent ae286cf commit 31da456

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Diff for: specification.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
{
341341
"id": "Requirement 1.7.7",
342342
"machine_id": "requirement_1_7_7",
343-
"content": "The client MUST default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `PROVIDER_FATAL`.",
343+
"content": "The client MUST default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `FATAL`.",
344344
"RFC 2119 keyword": "MUST",
345345
"children": []
346346
},

Diff for: specification/sections/01-flag-evaluation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ see: [error codes](../types.md#error-code), [flag value resolution](./02-provide
493493

494494
#### Requirement 1.7.7
495495

496-
> The client **MUST** default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `PROVIDER_FATAL`.
496+
> The client **MUST** default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `FATAL`.
497497
498498
The client defaults and returns the `PROVIDER_FATAL` `error code` if evaluation is attempted after the provider has transitioned to an irrecoverable error state.
499499
The SDK avoids calling the provider's resolver functions entirely ("short-circuits") if the provider is in this state.

Diff for: specification/sections/05-events.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,11 @@ The SDK must update it's internal representation of the provider's state accordi
229229
| -------------------------------- | ------------------------------------------------------- |
230230
| `PROVIDER_READY` | `READY` |
231231
| `PROVIDER_STALE` | `STALE` |
232-
| `PROVIDER_ERROR` | `ERROR` |
232+
| `PROVIDER_ERROR` | `ERROR`/`FATAL`* |
233233
| `PROVIDER_CONFIGURATION_CHANGED` | N/A (provider remains in its current state) |
234234
| `PROVIDER_CONTEXT_CHANGED` | N/A (only emitted by SDK during context reconciliation) |
235235
| `PROVIDER_RECONCILING` | N/A (only emitted by SDK during context reconciliation) |
236236

237-
see: [provider lifecycle management](01-flag-evaluation.md#17-provider-lifecycle-management)
237+
\* If the `error code` associated with the error indicates `PROVIDER_FATAL`, the state is set to `FATAL`
238+
239+
see: [provider lifecycle management](01-flag-evaluation.md#17-provider-lifecycle-management), [provider status](../types.md#provider-status) [error codes](../types.md#error-code)

Diff for: specification/types.md

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ An enumeration of possible provider states.
135135
| READY | The provider has been initialized, and is able to reliably resolve flag values. |
136136
| ERROR | The provider is initialized but is not able to reliably resolve flag values. |
137137
| STALE | The provider's cached state is no longer valid and may not be up-to-date with the source of truth. |
138+
| FATAL | The provider has entered an irrecoverable error state. |
138139
| RECONCILING* | The provider is reconciling its state with a context change. |
139140

140141
\* [static context (client-side) paradigm](./glossary.md#static-context-paradigm) only

0 commit comments

Comments
 (0)