Skip to content

fix: set reason=ERROR for error-path evaluations - #39

Merged
typotter merged 1 commit into
mainfrom
typo/fix-error-reason-in-fixtures
Sep 14, 2026
Merged

typotter merged 1 commit into
mainfrom
typo/fix-error-reason-in-fixtures

Conversation

@typotter

Copy link
Copy Markdown
Contributor

Both the browser SDK and Android SDK return reason=ERROR for all error evaluations (FLAG_NOT_FOUND, TYPE_MISMATCH) per the OpenFeature spec. The fixture schema used reason=null on error evaluations, causing FLEX integration tests to fail when asserting the reason field.

Affected fixtures:

  • evaluator/empty-flags-response.json
  • evaluator/defaults-and-emission-gates.json
  • evaluator/type-mismatch-all-types.json

Both the browser SDK and Android SDK (DatadogFlagsClient) return
reason=ERROR for all error evaluations (FLAG_NOT_FOUND, TYPE_MISMATCH)
per the OpenFeature spec. The fixture schema used reason=null on error
evaluations, which caused FLEX integration tests to fail when asserting
the reason field.

Affected fixtures:
- evaluator/empty-flags-response.json
- evaluator/defaults-and-emission-gates.json
- evaluator/type-mismatch-all-types.json
@typotter
typotter requested a review from a team as a code owner September 14, 2026 18:51
@typotter
typotter requested review from btthomas and leoromanovsky and removed request for a team September 14, 2026 18:51
@@ -80,7 +80,7 @@
"defaultValue": "fallback",
"expectedResult": {
"value": "fallback",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A dumb question and unrelated to approving this PR: is there ever a scenario when a fallback is not an error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. When there are not allocations in the UFC or zero of the allocations match the subject (this implies a lack of default allocation)

see ADR-01,04

@typotter

Copy link
Copy Markdown
Contributor Author

Thanks Sameeran

@typotter
typotter merged commit 6d3a386 into main Sep 14, 2026
2 checks passed
@typotter
typotter deleted the typo/fix-error-reason-in-fixtures branch September 14, 2026 20:33
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.

2 participants