spec icon indicating copy to clipboard operation
spec copied to clipboard

Evaluation Context related error status

Open kinyoklion opened this issue 3 years ago • 2 comments

For some providers contexts are going to require certain attributes to function correctly. For instance a targeting key.

It would be good if there was an error code for context related problems, for instance MALFORMED_CONTEXT.

This would help to more quickly narrow down usage errors.

kinyoklion avatar Sep 22 '22 20:09 kinyoklion

I agree this would be helpful. I'd accept MALFORMED_CONTEXT, but I'll also suggest INVALID_CONTEXT as another possible alternative. "Malformed" suggests to me something like a structural error, while "invalid" implies either structural or semantic issues (like a missing targeting key). I think either work though.

toddbaert avatar Sep 23 '22 01:09 toddbaert

Yes it would be great to have something like that in the providers to be explicit when a field is missing.

thomaspoignant avatar Sep 23 '22 05:09 thomaspoignant

Resolved in https://github.com/open-feature/spec/pull/142

kinyoklion avatar Sep 27 '22 18:09 kinyoklion