Skip to content

fix: Include an error type in provider error events - #73

Open
kinyoklion wants to merge 1 commit into
mainfrom
devin/1790779334-error-event-code
Open

kinyoklion wants to merge 1 commit into
mainfrom
devin/1790779334-error-event-code

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

OFP requirement 5.1.5 (sdk-specs OFP-openfeature-provider-behavior): PROVIDER_ERROR events SHOULD populate the event details' error code.

Describe the solution you've provided

StatusProvider.EmitProviderEvent sets ProviderEventPayload.ErrorType = ErrorType.General for ProviderEventTypes.ProviderError events (emitted when the LaunchDarkly data source is Off). Added ProviderTests.ItIncludesAnErrorTypeInErrorEvents.

Describe alternatives you've considered

A more specific type (e.g. ProviderFatal for 401/403) was not used; OFP does not define a mapping, and the Python provider already uses GENERAL for the same transition.

Additional context

Validated locally with dotnet test on net8.0 (69 passed).

Link to Devin session: https://app.devin.ai/sessions/929f5530882d40bc95e55391e97536d5
Open in Devin Desktop: https://app.devin.ai/desktop/session/929f5530882d40bc95e55391e97536d5?variant=devin
Requested by: @kinyoklion

SDK-3255


Note

Overview
Aligns provider status error events with OpenFeature provider behavior (OFP 5.1.5) by populating the event’s error code when the provider reports an error.

StatusProvider.EmitProviderEvent now sets ProviderEventPayload.ErrorType to ErrorType.General whenever the event type is ProviderError (e.g. when status moves to Error/Fatal after the data source is Off). A new test drives a post-init data-source Off transition and asserts the emitted event is ProviderError with ErrorType.General.

Reviewed by Cursor Bugbot for commit 7a95e73. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@kinyoklion
kinyoklion marked this pull request as ready for review October 16, 2026 21:39
@kinyoklion
kinyoklion requested a review from a team as a code owner October 16, 2026 21:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant