Skip to content

Commit 6ef2c49

Browse files
committed
lint issues
1 parent 7ef3b5c commit 6ef2c49

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

packages/shared/sdk-client/src/datasource/DataSourceStatusManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class DataSourceStatusManager {
3838

3939
/**
4040
* Updates the state of the manager.
41-
*
41+
*
4242
* @param requestedState to track
4343
* @param isError to indicate that the state update is a result of an error occurring.
4444
*/

packages/shared/sdk-server/src/data_sources/PollingProcessor.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ export default class PollingProcessor implements subsystem.LDStreamProcessor {
4848
const reportJsonError = (data: string) => {
4949
this.logger?.error('Polling received invalid data');
5050
this.logger?.debug(`Invalid JSON follows: ${data}`);
51-
this.errorHandler?.(new LDPollingError(DataSourceErrorKind.InvalidData, 'Malformed JSON data in polling response'));
51+
this.errorHandler?.(
52+
new LDPollingError(
53+
DataSourceErrorKind.InvalidData,
54+
'Malformed JSON data in polling response',
55+
),
56+
);
5257
};
5358

5459
const startTime = Date.now();
@@ -63,7 +68,9 @@ export default class PollingProcessor implements subsystem.LDStreamProcessor {
6368
if (status && !isHttpRecoverable(status)) {
6469
const message = httpErrorMessage(err, 'polling request');
6570
this.logger?.error(message);
66-
this.errorHandler?.(new LDPollingError(DataSourceErrorKind.ErrorResponse, message, status));
71+
this.errorHandler?.(
72+
new LDPollingError(DataSourceErrorKind.ErrorResponse, message, status),
73+
);
6774
// It is not recoverable, return and do not trigger another
6875
// poll.
6976
return;

packages/shared/sdk-server/src/data_sources/Requestor.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99

1010
import { LDFeatureRequestor } from '../api/subsystems';
1111
import Configuration from '../options/Configuration';
12-
import { DataSourceErrorKind } from '@launchdarkly/js-sdk-common/dist/internal';
12+
13+
const { DataSourceErrorKind } = internal;
1314

1415
// TODO: revisit usage of internal and figure out best practice
1516
const { LDPollingError } = internal;
@@ -81,7 +82,11 @@ export default class Requestor implements LDFeatureRequestor {
8182
try {
8283
const { res, body } = await this.requestWithETagCache(this.uri, options);
8384
if (res.status !== 200 && res.status !== 304) {
84-
const err = new LDPollingError(DataSourceErrorKind.ErrorResponse, `Unexpected status code: ${res.status}`, res.status);
85+
const err = new LDPollingError(
86+
DataSourceErrorKind.ErrorResponse,
87+
`Unexpected status code: ${res.status}`,
88+
res.status,
89+
);
8590
return cb(err, undefined);
8691
}
8792
return cb(undefined, res.status === 304 ? null : body);

0 commit comments

Comments
 (0)