-
Notifications
You must be signed in to change notification settings - Fork 31
fix: browser logging for non-existing flags #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
eb93600 to
a960a00
Compare
|
@launchdarkly/js-client-sdk-common size report |
🤖 I have created a release *beep* *boop* --- <details><summary>browser: 0.1.1</summary> ## [0.1.1](browser-v0.1.0...browser-v0.1.1) (2026-01-08) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk bumped from 0.12.0 to 0.12.1 </details> <details><summary>browser-telemetry: 1.0.17</summary> ## [1.0.17](browser-telemetry-v1.0.16...browser-telemetry-v1.0.17) (2026-01-08) ### Dependencies * The following workspace dependencies were updated * devDependencies * @launchdarkly/js-client-sdk bumped from 0.12.0 to 0.12.1 </details> <details><summary>jest: 0.2.1</summary> ## [0.2.1](jest-v0.2.0...jest-v0.2.1) (2026-01-08) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/react-native-client-sdk bumped from ~10.12.4 to ~10.12.5 </details> <details><summary>js-client-sdk: 0.12.1</summary> ## [0.12.1](js-client-sdk-v0.12.0...js-client-sdk-v0.12.1) (2026-01-08) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.17.0 to 1.17.1 </details> <details><summary>js-client-sdk-common: 1.17.1</summary> ## [1.17.1](js-client-sdk-common-v1.17.0...js-client-sdk-common-v1.17.1) (2026-01-08) ### Bug Fixes * browser logging for non-existing flags ([#1054](#1054)) ([f87b418](f87b418)) </details> <details><summary>react-native-client-sdk: 10.12.5</summary> ## [10.12.5](react-native-client-sdk-v10.12.4...react-native-client-sdk-v10.12.5) (2026-01-08) ### Dependencies * The following workspace dependencies were updated * dependencies * @launchdarkly/js-client-sdk-common bumped from 1.17.0 to 1.17.1 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Release summary** > > - Bumps `@launchdarkly/js-client-sdk` to `0.12.1`, `@launchdarkly/browser` to `0.1.1`, `@launchdarkly/react-native-client-sdk` to `10.12.5`, `@launchdarkly/js-client-sdk-common` to `1.17.1`, `@launchdarkly/browser-telemetry` to `1.0.17`, and `@launchdarkly/jest` to `0.2.1` (manifest and changelogs updated) > - Updates inter-package dependencies to these versions and refreshes in-code version constants in `BrowserInfo.ts` and `PlatformInfo.ts` > - Includes bug fix from `@launchdarkly/[email protected]`: browser logging for non-existing flags > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 43273ab. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Requirements
Related issues
SDK-1736
Describe the solution you've provided
variationon a non-existent flag, we now should only get a warning message and the default flag value will be returnederrorto the client side emitter, but we will still return an error detail as well as send an error event to LDAdditional context
This behavior should now be consistent with what we have in v3 (https://github.com/launchdarkly/js-sdk-common/blob/main/src/index.js#L339). The reason for this change is that there is a valid chance that a missing flag is not considered a "error" level event on the application as developers can handle these cases with defaults (and more specialized handling by looking at the variation detail).
Note
Aligns unknown-flag behavior with v3 by de-escalating from client error events to warnings.
LDClientImpl._variationInternal, replace emittererrorwithlogger.warnfor unknown flags; still sendunknownFlagEventand returncreateErrorEvaluationDetail(FLAG_NOT_FOUND, ...).LDClientImpl.variation.test.tsto expect a warning and default value forvariation, and an error detail forvariationDetail.Written by Cursor Bugbot for commit a960a00. This will update automatically on new commits. Configure here.