Uncaught rejected promise when attempting to fetch flags while offline
Hi there 👋 I'm seeing an uncaught rejection when calling Flagsmith.init while offline.
It seems to be coming from this call: https://github.com/Flagsmith/flagsmith-js-client/blob/f2c29640991df6428c2603d98da7f847276dd4fd/flagsmith-core.ts#L447-L449
It doesn't cause any real issues as flags are still resolved correctly from local storage, and since the user is likely offline when this happens, it may not affect our telemetry. However, since it's not an error that can be caught in user land, perhaps it'd make more sense to handle the rejection and only reject from init() if the cache fails.
Please let me know if you need more details, thank you!
Hi @frankieyan, thanks for raising this. I think your suggestion here makes sense
handle the rejection and only reject from init() if the cache fails
Would you be willing to submit a PR for this?