File tree Expand file tree Collapse file tree
packages/shared/sdk-client/src/datasource/fdv2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 Requests ,
1010 ServiceEndpoints ,
1111 shouldRetry ,
12+ DataSourceErrorKind ,
1213} from '@launchdarkly/js-sdk-common' ;
1314
1415import { processFlagEval } from '../flagEvalMapper' ;
@@ -280,8 +281,16 @@ export function createStreamingBase(config: {
280281 config . logger ?. info ( 'Closed LaunchDarkly stream connection' ) ;
281282 } ;
282283
283- es . onerror = ( ) => {
284- // Error handling is done by errorFilter.
284+ es . onerror = ( err ?: HttpErrorResponse ) => {
285+ if ( err && typeof err . status === 'number' ) {
286+ // This condition will be handled by the error filter.
287+ return ;
288+ }
289+ resultQueue . put ( interrupted ( {
290+ kind : DataSourceErrorKind . NetworkError ,
291+ message : err ?. message ?? 'IO Error' ,
292+ time : Date . now ( ) ,
293+ } , fdv1Fallback ) ) ;
285294 } ;
286295
287296 es . onopen = ( ) => {
You can’t perform that action at this time.
0 commit comments