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
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