configcat / .net-sdk

ConfigCat SDK for .NET. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/csharp
Other
29 stars 8 forks source link

Error reporting improvements #86

Closed adams85 closed 5 months ago

adams85 commented 9 months ago

Describe the purpose of your pull request

Define error codes (EvaluationErrorCode, RefreshErrorCode) and expose them to the user (EvaluationDetails.ErrorCode, RefreshResult.ErrorCode) so they can reliably identify the error type without resorting to guess it by checking the error message (see also: https://github.com/open-feature/dotnet-sdk-contrib/pull/119#discussion_r1433928330)

The PR also proposes a new hook named ConfigFetched which could be used to observe config fetching-related errors even when refreshing is done by the SDK.

Related issues (only if applicable)

https://trello.com/c/0KrZmHgQ

Requirement checklist (only if applicable)

sonarcloud[bot] commented 9 months ago

Quality Gate Failed Quality Gate failed

Failed conditions

67.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
79.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud