Skip to content

Commit b2bd8f2

Browse files
chore(deps): update dependency tools/flagd-api-testkit/test-harness to v3.5.0 (#1749)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent 3ba543e commit b2bd8f2

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
[submodule "tools/flagd-api-testkit/test-harness"]
1818
path = tools/flagd-api-testkit/test-harness
1919
url = https://github.com/open-feature/test-harness.git
20-
branch = v3.1.0
20+
branch = v3.5.0

tools/flagd-api-testkit/src/main/java/dev/openfeature/contrib/tools/flagd/api/testkit/EvaluationSteps.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ public void flagEvaluatedWithDetails() {
7777
.errorCode(ErrorCode.TYPE_MISMATCH)
7878
.errorMessage(e.getMessage())
7979
.build();
80+
} catch (dev.openfeature.sdk.exceptions.OpenFeatureError e) {
81+
// Mirror the OpenFeature SDK client behaviour: on any provider error, return the
82+
// caller-supplied default value together with the error code and message.
83+
state.evaluation = dev.openfeature.sdk.ProviderEvaluation.builder()
84+
.value(state.defaultValue)
85+
.errorCode(e.getErrorCode())
86+
.errorMessage(e.getMessage())
87+
.build();
8088
}
8189
}
8290

0 commit comments

Comments
 (0)