-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, when a flag key isn't found, the SDK returns a generic FlagsmithAPIError with the message API returned invalid response.
This forces consumers (cf OpenFeature crate) to rely on fragile string matching to detect this case.
Proposed solution
Add a FlagNotFound variant to ErrorKind and return it from Flags::get_flag when the key doesn't exist in the HashMap.
Requirements
- Add FlagNotFound error kind and return it from Flags::get_flag
- Update the OpenFeature provider to use the new error kind instead of string matching
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request