[FEATURE] Improved error messages
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).
Hi, @toddbaert could you tell how exactly the error message should be ?
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"
if this issue is still up for grabs ill take it
Reassigning.
Fixed by #1325