spotify / confidence-sdk-go

Apache License 2.0
2 stars 1 forks source link

Panic on nil value property from backend #61

Open fabriziodemaria opened 2 months ago

fabriziodemaria commented 2 months ago

Example:

value := confidence.GetIntFlag(
  context.Background(),
  "all-types-flag.myint",
  3,
)

If the myint field is null from backend, the expected behaviour is to return the default value (i.e. 3 in this case).

Current behaviour:

Exception has occurred: panic
"interface conversion: interface {} is nil, not json.Number"