Skip to content

Commit

Permalink
fixing StreamingErrorHandler namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Dec 2, 2024
1 parent 1608aa8 commit 0011048
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
ProcessStreamResponse,
Requests,
shouldRetry,
StreamingErrorHandler,
subsystem,
} from '@launchdarkly/js-sdk-common';

Expand All @@ -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}`);
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/sdk-server/__tests__/streamingProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {
LDHeaders,
LDStreamingError,
ProcessStreamResponse,
StreamingErrorHandler,
} from '@launchdarkly/js-sdk-common';

export const MockStreamingProcessor = jest.fn();
Expand All @@ -29,7 +30,7 @@ export const setupMockStreamingProcessor = (
listeners: Map<EventName, ProcessStreamResponse>,
baseHeaders: LDHeaders,
diagnosticsManager: internal.DiagnosticsManager,
errorHandler: internal.StreamingErrorHandler,
errorHandler: StreamingErrorHandler,
_streamInitialReconnectDelay: number,
) => ({
start: jest.fn(async () => {
Expand Down

0 comments on commit 0011048

Please sign in to comment.