Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Disabled flags results in an incorrect error message #668

Closed
Kavindu-Dodan opened this issue May 23, 2023 · 0 comments · Fixed by #670
Closed

[BUG] Disabled flags results in an incorrect error message #668

Kavindu-Dodan opened this issue May 23, 2023 · 0 comments · Fixed by #670
Assignees
Labels
bug Something isn't working

Comments

@Kavindu-Dodan
Copy link
Contributor

Kavindu-Dodan commented May 23, 2023

Observed behavior

When feature flag is DISABLED, flag return an incorrect error message

error code: PROVIDER_NOT_READY: connection not made

Expected Behavior

The error message should highlight the fact that flag is disabled. This must be corrected at code level [1] as this is infered incorrectly at go-sdk-contrib [2]

[1] - https://github.com/open-feature/flagd/blob/main/core/pkg/service/flag-evaluation/flag_evaluator.go#L325C1-L326
[2] - https://github.com/open-feature/go-sdk-contrib/blob/main/providers/flagd/pkg/service/service.go#L184-L185C1

Steps to reproduce

Disable a flag and observe the error log of the feature flag client

@Kavindu-Dodan Kavindu-Dodan added bug Something isn't working Needs Triage This issue needs to be investigated by a maintainer and removed Needs Triage This issue needs to be investigated by a maintainer labels May 23, 2023
@Kavindu-Dodan Kavindu-Dodan self-assigned this May 24, 2023
Kavindu-Dodan added a commit that referenced this issue May 25, 2023
## This PR

fixes #668 

Fixes incorrect error code mapping, which resulted in error message
`error code: PROVIDER_NOT_READY: connection not made`

With fix, the error code is set to unknown (as there is no appropriate
error code for this error) , and results in message `openfeature:
GENERAL: unknown: FLAG_DISABLED`

---------

Signed-off-by: Kavindu Dodanduwa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant