flagd icon indicating copy to clipboard operation
flagd copied to clipboard

[FEATURE] Improved error messages

Open toddbaert opened this issue 2 years ago • 2 comments

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 avatar Dec 21 '23 18:12 toddbaert

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

Baalekshan avatar May 04 '24 15:05 Baalekshan

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"

beeme1mr avatar May 06 '24 19:05 beeme1mr

if this issue is still up for grabs ill take it

DBlanchard88 avatar Jun 10 '24 21:06 DBlanchard88

Reassigning.

toddbaert avatar Jun 10 '24 21:06 toddbaert

Fixed by #1325

Kavindu-Dodan avatar Jun 25 '24 21:06 Kavindu-Dodan