You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(audience): wire onError callback from AudienceConfig through to core
Exposes AudienceError to web SDK consumers. The core queue and consent
manager already accept an onError callback and map TransportError to a
public AudienceError via toAudienceError; this commit just forwards
AudienceConfig.onError into both positional slots in the Audience
constructor, which were previously hard-coded to undefined.
Also re-exports AudienceError (runtime) and AudienceErrorCode (type)
from the @imtbl/audience package index so ESM consumers can import
the error type they need for their onError handler. CDN consumers
already have it via window.ImmutableAudience.AudienceError from the
CDN bundle work in #2853.
Two new sdk.test.ts tests cover the wire-through end-to-end: a flush
failure against a mocked backend, and a consent sync failure against
a mocked backend. Both verify the AudienceError shape (name, code,
status, endpoint) rather than just that the callback fires.
Refs SDK-49
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments