diff --git a/packages/shared/sdk-client/src/LDClientImpl.timeout.test.ts b/packages/shared/sdk-client/src/LDClientImpl.timeout.test.ts index fe3e2c3c5c..85e8e3d59b 100644 --- a/packages/shared/sdk-client/src/LDClientImpl.timeout.test.ts +++ b/packages/shared/sdk-client/src/LDClientImpl.timeout.test.ts @@ -121,7 +121,7 @@ describe('sdk-client identify timeout', () => { await ldc.identify(carContext, { timeout: customTimeout }); expect(ldc.identifyTimeout).toEqual(10); - expect(logger.warn).not.toHaveBeenCalledWith(expect.stringMatching(/high timeout/)); + expect(logger.warn).not.toHaveBeenCalledWith(expect.stringMatching(/timeout greater/)); }); test('warning when timeout is too high', async () => { @@ -131,7 +131,7 @@ describe('sdk-client identify timeout', () => { await ldc.identify(carContext, { timeout: highTimeout }); - expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/high timeout/)); + expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/timeout greater/)); }); test('safe timeout should not warn', async () => { @@ -142,6 +142,6 @@ describe('sdk-client identify timeout', () => { await ldc.identify(carContext, { timeout: safeTimeout }); - expect(logger.warn).not.toHaveBeenCalledWith(expect.stringMatching(/high timeout/)); + expect(logger.warn).not.toHaveBeenCalledWith(expect.stringMatching(/timeout greater/)); }); }); diff --git a/packages/shared/sdk-client/src/LDClientImpl.ts b/packages/shared/sdk-client/src/LDClientImpl.ts index 8cdf53dc38..eef1cb12f5 100644 --- a/packages/shared/sdk-client/src/LDClientImpl.ts +++ b/packages/shared/sdk-client/src/LDClientImpl.ts @@ -292,7 +292,11 @@ export default class LDClientImpl implements LDClient { } if (this.identifyTimeout > this.highTimeoutThreshold) { - this.logger.warn('identify called with high timeout parameter.'); + this.logger.warn( + 'The identify function was called with a timeout greater than' + + `${this.highTimeoutThreshold} seconds. We recommend a timeout of less than` + + `${this.highTimeoutThreshold} seconds.`, + ); } let context = await ensureKey(pristineContext, this.platform);