@lugehorsam Pushed an update to add in those separate functions. The base functions (getFlag and getFlagDefault) now return a rejected promise when the network call fails or the flag does not exist. The new functions (getFlagWithFallback and getFlagDefaultWithFallback) will return a flag with the given fallback value when the flag does not exist. For getFlagWithFallback it will still return a rejected promise if the server is unavailable / the session is invalid etc. For getFlagDefaultWithFallback it will return a flag with the given fallback regardless of whether it could reach the Satori server or the flag doesn't exist.
@lugehorsam Pushed an update to add in those separate functions. The base functions (
getFlag
andgetFlagDefault
) now return a rejected promise when the network call fails or the flag does not exist. The new functions (getFlagWithFallback
andgetFlagDefaultWithFallback
) will return a flag with the given fallback value when the flag does not exist. ForgetFlagWithFallback
it will still return a rejected promise if the server is unavailable / the session is invalid etc. ForgetFlagDefaultWithFallback
it will return a flag with the given fallback regardless of whether it could reach the Satori server or the flag doesn't exist.