Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
0020e0d to
9e28f66
Compare
|
@launchdarkly/js-client-sdk-common size report |
9e28f66 to
301c447
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 301c447. Configure here.
|
Closing as we will delegate to overriding the logger |
This PR will add the ability to suppress error logs using the same technique as some server sdks:
Now, if developers subscribes to the
errorevent, then they will no longer see error logs. Insteadthey are expected to handle errors themselves in the event callback.
basically doing the same thing as the old browser sdk
Note
Medium Risk
Changes how SDK errors are surfaced (emit vs log) across identify/streaming/polling and evaluation paths; risk is primarily behavioral for consumers who relied on default logger output or listener counts.
Overview
Adds opt-in suppression of internal error logging: errors are now logged only when no
errorlisteners are registered, and otherwise are emitted to user handlers.This introduces
LDEmitter.maybeReportErrorand routes key error paths (invalid context inidentify, streaming/polling failures inDataManager, and wrong-type flag evaluations) through it. The defaultLDClientImpl-levelerrorlistener is removed, and tests are updated/added to verify listener-count behavior and the new log-vs-emit semantics.Reviewed by Cursor Bugbot for commit 301c447. Bugbot is set up for automated code reviews on this repo. Configure here.