Unleash / unleash

Open-source feature management solution built for developers.
https://getunleash.io
Apache License 2.0
11.24k stars 703 forks source link

Make SDKs smart enough to know when they are retrieving the incorrect format #8157

Open FredrikOseberg opened 1 month ago

FredrikOseberg commented 1 month ago

Describe the feature request

We currently have two types of SDKs:

Due to the nature of how these SDKs operate, where frontend SDKs operate in unsafe environments and client SDKs operate in safe environments, they receive different datasets from Unleash from different endpoints. This is sometimes a source of confusion for people who are new to Unleash and setting it up for the first time. I would like the SDKs to be smart enough to know whether they received the correct format from the API, and to warn you if not.

Background

Here is a recent occurrence but this is certainly a recurring theme: unleash/unleash-edge#521

Solution suggestions

It could simply be a header that we include in the /api/client/features endpoint and a different header in /api/frontend that the SDKs can act upon when they receive the response.

stale[bot] commented 1 day ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.