From 00110484a0eaaf6aba34b15b3eb1eb66a790982e Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Mon, 2 Dec 2024 14:52:13 -0600 Subject: [PATCH] fixing StreamingErrorHandler namespace --- .../shared/sdk-client/src/streaming/StreamingProcessor.ts | 5 +++-- packages/shared/sdk-server/__tests__/streamingProcessor.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/shared/sdk-client/src/streaming/StreamingProcessor.ts b/packages/shared/sdk-client/src/streaming/StreamingProcessor.ts index f6aad31af..48f49858c 100644 --- a/packages/shared/sdk-client/src/streaming/StreamingProcessor.ts +++ b/packages/shared/sdk-client/src/streaming/StreamingProcessor.ts @@ -13,6 +13,7 @@ import { ProcessStreamResponse, Requests, shouldRetry, + StreamingErrorHandler, subsystem, } from '@launchdarkly/js-sdk-common'; @@ -23,7 +24,7 @@ const reportJsonError = ( type: string, data: string, logger?: LDLogger, - errorHandler?: internal.StreamingErrorHandler, + errorHandler?: StreamingErrorHandler, ) => { logger?.error(`Stream received invalid data in "${type}" message`); logger?.debug(`Invalid JSON follows: ${data}`); @@ -47,7 +48,7 @@ class StreamingProcessor implements subsystem.LDStreamProcessor { encoding: Encoding, private readonly _pollingRequestor: Requestor, private readonly _diagnosticsManager?: internal.DiagnosticsManager, - private readonly _errorHandler?: internal.StreamingErrorHandler, + private readonly _errorHandler?: StreamingErrorHandler, private readonly _logger?: LDLogger, ) { let path: string; diff --git a/packages/shared/sdk-server/__tests__/streamingProcessor.ts b/packages/shared/sdk-server/__tests__/streamingProcessor.ts index 2f6e2a802..15808a3f2 100644 --- a/packages/shared/sdk-server/__tests__/streamingProcessor.ts +++ b/packages/shared/sdk-server/__tests__/streamingProcessor.ts @@ -5,6 +5,7 @@ import type { LDHeaders, LDStreamingError, ProcessStreamResponse, + StreamingErrorHandler, } from '@launchdarkly/js-sdk-common'; export const MockStreamingProcessor = jest.fn(); @@ -29,7 +30,7 @@ export const setupMockStreamingProcessor = ( listeners: Map, baseHeaders: LDHeaders, diagnosticsManager: internal.DiagnosticsManager, - errorHandler: internal.StreamingErrorHandler, + errorHandler: StreamingErrorHandler, _streamInitialReconnectDelay: number, ) => ({ start: jest.fn(async () => {