[ConfigCat] Evaluation errors are returned as a successful default with no error code

未关闭
#1,963 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@RaphaelFakhri 已经在做这个了。

开始于 2026年11月3日。

  • #1964 来自 @RaphaelFakhri —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java

调研方向

Start with ConfigCatProvider's getEvaluation method, which the issue identifies as ignoring EvaluationDetails.getError(), and reproduce the cases using the module tests' local features.json override. Done means missing flags return FLAG_NOT_FOUND with reason ERROR, and other evaluation errors return GENERAL with the ConfigCat error message.

由索引模型根据 Issue 内容生成。

描述

Observed behavior

When ConfigCat cannot evaluate a flag, ConfigCatProvider returns the caller's default value with no errorCode, no errorMessage and no reason. Error hooks do not run, and the evaluation looks successful.

This affects at least these cases:

  • The flag key does not exist in the config.
  • The flag type does not match the requested type, for example getIntegerDetails on a string setting.

ConfigCat itself detects both errors and reports them in EvaluationDetails.getError(), but getEvaluation ignores that field.

Expected behavior

A missing flag resolves with errorCode=FLAG_NOT_FOUND and reason=ERROR. Other ConfigCat evaluation errors resolve with an error code (GENERAL) and the ConfigCat error message.

Steps to reproduce

Use the provider with the local features.json override from the module tests:

FlagEvaluationDetails<String> details = client.getStringDetails("non-existing", "fallback_str");
// value=fallback_str, reason=null, errorCode=null, errorMessage=null

ConfigCat logs [1001] Failed to evaluate setting 'non-existing' (the key was not found in config JSON), but the OpenFeature result reports no error.

Version: dev.openfeature.contrib.providers:configcat 0.2.1 (current main), configcat-java-client 9.4.4.

主要语言
Java
星标
49
派生
85
平均合并
1 天 14 小时
30 天内合并 PR
53

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

open-feature/java-sdk-contrib 的其他 Issue

查看 open-feature/java-sdk-contrib 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。