open-feature / swift-sdk

Swift implementation of the OpenFeature SDK for iOS clients
https://openfeature.dev
Apache License 2.0
17 stars 2 forks source link

ProviderEvent FATAL is missing #40

Closed thomaspoignant closed 3 months ago

thomaspoignant commented 3 months ago

In the implementation of the SDK, the PROVIDER_FATAL event is missing.

The spec says

If the provider's initialize function fails to render the provider ready to evaluate flags, it SHOULD abnormally terminate.

If a provider is unable to start up correctly, it should indicate abnormal execution by throwing an exception, returning an error, or otherwise indicating so by means idiomatic to the implementation language. If the error is irrecoverable (perhaps due to bad credentials or invalid configuration) the PROVIDER_FATAL error code should be used.

https://github.com/open-feature/swift-sdk/blob/02b033c954766e86d5706bfc8ee5248244c11e77/Sources/OpenFeature/Provider/ProviderEvents.swift#L7,L12