Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

EvaluationException error message does not include feature flag key. #132

Closed
alexwei opened this issue Aug 16, 2018 · 3 comments
Closed

Comments

@alexwei
Copy link

alexwei commented Aug 16, 2018

Our codebase has async requests coming in to evaluate feature flag, and we have seen some flags assuming different result type when what is set on LD, but it's very hard for us to find out the culprit flag.

com.launchdarkly.client.EvaluationException: Feature flag evaluation expected result as string type, but got non-string type.
at com.launchdarkly.client.VariationType$4.assertResultType(VariationType.java:40)
at com.launchdarkly.client.LDClient.evaluate(LDClient.java:369)
at com.launchdarkly.client.LDClient.stringVariation(LDClient.java:298)

It would be helpful if the error message actually includes the key of the flag.

@alexwei alexwei changed the title Error log message does not include EvaluationException error message does not include feature flag name. Aug 16, 2018
@alexwei alexwei changed the title EvaluationException error message does not include feature flag name. EvaluationException error message does not include feature flag key. Aug 16, 2018
@eli-darkly
Copy link
Contributor

That's true. We'll have a fix for this soon.

Related: the stacktraces for exceptions like this are not particularly useful - we should be logging them only at debug level.

@eli-darkly
Copy link
Contributor

This has been fixed in version 4.2.2. Thanks for pointing it out.

eli-darkly added a commit that referenced this issue Aug 2, 2019
add polling mode tests and end-to-end streaming test
@ZhDev
Copy link

ZhDev commented Jun 2, 2023

The issue is still present in the code, the flag key is not being logged:

evaluationLogger.error("Feature flag evaluation expected result as {}, but got {}", defaultValue.getType(), value.getType());

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants