deftinc / feature_gate

MIT License
0 stars 2 forks source link

fix KeyError by providing empty dict as default value #10

Closed vinbarnes closed 2 months ago

vinbarnes commented 3 months ago

This fixes KeyError 'data' errors.

This switches access for the dict to use .get() and supplies a default value {} when the 'data' key is not present.

vinbarnes commented 2 months ago

Regarding the discussion of where errors should be handled, we determined that the client code using this library is responsible. We may revisit this at a later date depending on usage.