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

[FEATURE] Improved error messages #1100

Closed
toddbaert opened this issue Dec 21, 2023 · 5 comments
Closed

[FEATURE] Improved error messages #1100

toddbaert opened this issue Dec 21, 2023 · 5 comments
Assignees
Labels
contribfest A good issue for Contribfest KubeCon EU '24 enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@toddbaert
Copy link
Member

toddbaert commented Dec 21, 2023

Problem

The error messages we get back from the flagd evaluation API are less than ideal. They are an odd concatenation of an empty string and error code (see "message" below):

curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveString" \
      -d '{"flagKey":"not-found-flag","context":{}}' -H "Content-Type: application/json"


# {"code":"not_found","message":"FlagdError:, FLAG_NOT_FOUND"}

Requirements

Investigate the possibility of sending a better error message (should not be breaking - client code should use the code not the messages).

@toddbaert toddbaert added enhancement New feature or request 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 Dec 21, 2023
@beeme1mr beeme1mr added the help wanted Extra attention is needed label Jan 2, 2024
@toddbaert toddbaert added the contribfest A good issue for Contribfest KubeCon EU '24 label Mar 11, 2024
@thisthat thisthat added the good first issue Good for newcomers label Apr 25, 2024
@Baalekshan
Copy link

Hi, @toddbaert could you tell how exactly the error message should be ?

@beeme1mr
Copy link
Member

beeme1mr commented May 6, 2024

Hey @Baalekshan, the idea would be to map the error codes to more human-readable error messages. For example, "FlagdError:, FLAG_NOT_FOUND" could be "Flag not found"

@DBlanchard88
Copy link
Contributor

if this issue is still up for grabs ill take it

@toddbaert
Copy link
Member Author

Reassigning.

toddbaert added a commit that referenced this issue Jun 18, 2024
- Mapped the error codes to easier to read error messages
- Created unit test to check functionality

 #1100

---------

Signed-off-by: DBlanchard88 <[email protected]>
Signed-off-by: Dave <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
@Kavindu-Dodan
Copy link
Contributor

Fixed by #1325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribfest A good issue for Contribfest KubeCon EU '24 enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants