From 23da24bf9aa9d381ac7cf697e764e83a0cdc6119 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Fri, 24 Jan 2025 21:01:10 +0600 Subject: [PATCH] [FSSDK-11090] remove unused log messages --- lib/core/decision_service/index.ts | 12 +++-- lib/message/error_message.ts | 53 +++---------------- lib/message/log_message.ts | 30 ++--------- lib/odp/event_manager/odp_event_manager.ts | 4 +- lib/optimizely/index.tests.js | 6 +-- lib/optimizely/index.ts | 4 +- lib/optimizely_user_context/index.tests.js | 2 +- .../polling_datafile_manager.ts | 1 - lib/project_config/project_config.ts | 4 +- .../request_handler.browser.ts | 3 +- 10 files changed, 31 insertions(+), 88 deletions(-) diff --git a/lib/core/decision_service/index.ts b/lib/core/decision_service/index.ts index beb6b24da..21a63b763 100644 --- a/lib/core/decision_service/index.ts +++ b/lib/core/decision_service/index.ts @@ -61,10 +61,6 @@ import { import { SAVED_USER_VARIATION, SAVED_VARIATION_NOT_FOUND, - USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED, - USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID, - USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED, - USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID, USER_HAS_NO_FORCED_VARIATION, USER_MAPPED_TO_FORCED_VARIATION, USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT, @@ -98,6 +94,14 @@ export const IMPROPERLY_FORMATTED_EXPERIMENT = 'Experiment key %s is improperly export const USER_HAS_FORCED_VARIATION = 'Variation %s is mapped to experiment %s and user %s in the forced variation map.'; export const USER_MEETS_CONDITIONS_FOR_TARGETING_RULE = 'User %s meets conditions for targeting rule %s.'; +export const USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED = + 'Variation (%s) is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.'; +export const USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED = + 'Variation (%s) is mapped to flag (%s) and user (%s) in the forced decision map.'; +export const USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID = + 'Invalid variation is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.'; +export const USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID = + 'Invalid variation is mapped to flag (%s) and user (%s) in the forced decision map.'; export interface DecisionObj { experiment: Experiment | null; diff --git a/lib/message/error_message.ts b/lib/message/error_message.ts index 97844f639..0dcb28567 100644 --- a/lib/message/error_message.ts +++ b/lib/message/error_message.ts @@ -1,5 +1,5 @@ /** - * Copyright 2024, Optimizely + * Copyright 2024-2025, Optimizely * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,9 @@ * limitations under the License. */ export const NOTIFICATION_LISTENER_EXCEPTION = 'Notification listener for (%s) threw exception: %s'; -export const BROWSER_ODP_MANAGER_INITIALIZATION_FAILED = '%s: Error initializing Browser ODP Manager.'; export const CONDITION_EVALUATOR_ERROR = 'Error evaluating audience condition of type %s: %s'; -export const DATAFILE_AND_SDK_KEY_MISSING = - '%s: You must provide at least one of sdkKey or datafile. Cannot start Optimizely'; export const EXPERIMENT_KEY_NOT_IN_DATAFILE = 'Experiment key %s is not in datafile.'; export const FEATURE_NOT_IN_DATAFILE = 'Feature key %s is not in datafile.'; -export const FETCH_SEGMENTS_FAILED_NETWORK_ERROR = '%s: Audience segments fetch failed. (network error)'; -export const FETCH_SEGMENTS_FAILED_DECODE_ERROR = '%s: Audience segments fetch failed. (decode error)'; export const INVALID_ATTRIBUTES = 'Provided attributes are in an invalid format.'; export const INVALID_BUCKETING_ID = 'Unable to generate hash for bucketing ID %s: %s'; export const INVALID_DATAFILE = 'Datafile is invalid - property %s: %s'; @@ -38,45 +33,18 @@ export const INVALID_GROUP_ID = 'Group ID %s is not in datafile.'; export const INVALID_LOGGER = 'Provided "logger" is in an invalid format.'; export const INVALID_USER_ID = 'Provided user ID is in an invalid format.'; export const INVALID_USER_PROFILE_SERVICE = 'Provided user profile service instance is in an invalid format: %s.'; -export const LOCAL_STORAGE_DOES_NOT_EXIST = 'Error accessing window localStorage.'; export const MISSING_INTEGRATION_KEY = 'Integration key missing from datafile. All integrations should include a key.'; export const NO_DATAFILE_SPECIFIED = 'No datafile specified. Cannot start optimizely.'; export const NO_JSON_PROVIDED = 'No JSON object to validate against schema.'; export const NO_EVENT_PROCESSOR = 'No event processor is provided'; export const NO_VARIATION_FOR_EXPERIMENT_KEY = 'No variation key %s defined in datafile for experiment %s.'; -export const ODP_CONFIG_NOT_AVAILABLE = '%s: ODP is not integrated to the project.'; +export const ODP_CONFIG_NOT_AVAILABLE = 'ODP config is not available.'; export const ODP_EVENT_FAILED = 'ODP event send failed.'; export const ODP_EVENT_MANAGER_IS_NOT_RUNNING = 'ODP event manager is not running.'; export const ODP_EVENTS_SHOULD_HAVE_ATLEAST_ONE_KEY_VALUE = 'ODP events should have at least one key-value pair in identifiers.'; -export const ODP_FETCH_QUALIFIED_SEGMENTS_SEGMENTS_MANAGER_MISSING = - '%s: ODP unable to fetch qualified segments (Segments Manager not initialized).'; -export const ODP_IDENTIFY_FAILED_EVENT_MANAGER_MISSING = - '%s: ODP identify event %s is not dispatched (Event Manager not instantiated).'; -export const ODP_INITIALIZATION_FAILED = '%s: ODP failed to initialize.'; -export const ODP_INVALID_DATA = '%s: ODP data is not valid'; -export const ODP_EVENT_FAILED_ODP_MANAGER_MISSING = '%s: ODP Event failed to send. (ODP Manager not initialized).'; -export const ODP_FETCH_QUALIFIED_SEGMENTS_FAILED_ODP_MANAGER_MISSING = - '%s: ODP failed to Fetch Qualified Segments. (ODP Manager not initialized).'; -export const ODP_IDENTIFY_USER_FAILED_ODP_MANAGER_MISSING = - '%s: ODP failed to Identify User. (ODP Manager not initialized).'; -export const ODP_IDENTIFY_USER_FAILED_USER_CONTEXT_INITIALIZATION = - '%s: ODP failed to Identify User. (Failed during User Context Initialization).'; -export const ODP_MANAGER_UPDATE_SETTINGS_FAILED_EVENT_MANAGER_MISSING = - '%s: ODP Manager failed to update OdpConfig settings for internal event manager. (Event Manager not initialized).'; -export const ODP_MANAGER_UPDATE_SETTINGS_FAILED_SEGMENTS_MANAGER_MISSING = - '%s: ODP Manager failed to update OdpConfig settings for internal segments manager. (Segments Manager not initialized).'; -export const ODP_NOT_ENABLED = 'ODP is not enabled'; -export const ODP_NOT_INTEGRATED = '%s: ODP is not integrated'; -export const ODP_SEND_EVENT_FAILED_EVENT_MANAGER_MISSING = - '%s: ODP send event %s was not dispatched (Event Manager not instantiated).'; -export const ODP_SEND_EVENT_FAILED_UID_MISSING = - '%s: ODP send event %s was not dispatched (No valid user identifier provided).'; -export const ODP_SEND_EVENT_FAILED_VUID_MISSING = '%s: ODP send event %s was not dispatched (Unable to fetch VUID).'; -export const ODP_VUID_INITIALIZATION_FAILED = '%s: ODP VUID initialization failed.'; -export const ODP_VUID_REGISTRATION_FAILED = '%s: ODP VUID failed to be registered.'; -export const ODP_VUID_REGISTRATION_FAILED_EVENT_MANAGER_MISSING = - '%s: ODP register vuid failed. (Event Manager not instantiated).'; +export const ODP_EVENT_FAILED_ODP_MANAGER_MISSING = 'ODP Event failed to send. (ODP Manager not available).'; +export const ODP_NOT_INTEGRATED = 'ODP is not integrated'; export const UNDEFINED_ATTRIBUTE = 'Provided attribute: %s has an undefined value.'; export const UNRECOGNIZED_ATTRIBUTE = 'Unrecognized attribute %s provided. Pruning before sending event to Optimizely.'; @@ -86,17 +54,15 @@ export const USER_NOT_IN_FORCED_VARIATION = export const USER_PROFILE_LOOKUP_ERROR = 'Error while looking up user profile for user ID "%s": %s.'; export const USER_PROFILE_SAVE_ERROR = 'Error while saving user profile for user ID "%s": %s.'; export const VARIABLE_KEY_NOT_IN_DATAFILE = - '%s: Variable with key "%s" associated with feature with key "%s" is not in datafile.'; -export const VARIATION_ID_NOT_IN_DATAFILE = '%s: No variation ID %s defined in datafile for experiment %s.'; -export const VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT = 'Variation ID %s is not in the datafile.'; + 'Variable with key "%s" associated with feature with key "%s" is not in datafile.'; +export const VARIATION_ID_NOT_IN_DATAFILE = 'Variation ID %s is not in the datafile.'; export const INVALID_INPUT_FORMAT = 'Provided %s is in an invalid format.'; export const INVALID_DATAFILE_VERSION = 'This version of the JavaScript SDK does not support the given datafile version: %s'; export const INVALID_VARIATION_KEY = 'Provided variation key is in an invalid format.'; -export const UNABLE_TO_GET_VUID = 'Unable to get VUID - ODP Manager is not instantiated yet.'; export const ERROR_FETCHING_DATAFILE = 'Error fetching datafile: %s'; export const DATAFILE_FETCH_REQUEST_FAILED = 'Datafile fetch request failed with status: %s'; -export const EVENT_DATA_FOUND_TO_BE_INVALID = 'Event data found to be invalid.'; +export const EVENT_DATA_INVALID = 'Event data invalid.'; export const EVENT_ACTION_INVALID = 'Event action invalid.'; export const FAILED_TO_SEND_ODP_EVENTS = 'failed to send odp events'; export const UNABLE_TO_GET_VUID_VUID_MANAGER_NOT_AVAILABLE = 'Unable to get VUID - VuidManager is not available' @@ -135,13 +101,10 @@ export const SEND_BEACON_FAILED = 'sendBeacon failed'; export const FAILED_TO_DISPATCH_EVENTS = 'Failed to dispatch events' export const FAILED_TO_DISPATCH_EVENTS_WITH_ARG = 'Failed to dispatch events: %s'; export const EVENT_PROCESSOR_STOPPED = 'Event processor stopped before it could be started'; -export const CANNOT_START_WITHOUT_ODP_CONFIG = 'cannot start without ODP config'; -export const START_CALLED_WHEN_ODP_IS_NOT_INTEGRATED = 'start() called when ODP is not integrated'; -export const ODP_ACTION_IS_NOT_VALID = 'ODP action is not valid (cannot be empty).'; export const ODP_MANAGER_STOPPED_BEFORE_RUNNING = 'odp manager stopped before running'; export const ODP_EVENT_MANAGER_STOPPED = "ODP event manager stopped before it could start"; -export const ONREADY_TIMEOUT_EXPIRED = 'onReady timeout expired after %s ms'; export const DATAFILE_MANAGER_FAILED_TO_START = 'Datafile manager failed to start'; export const UNABLE_TO_ATTACH_UNLOAD = 'unable to bind optimizely.close() to page unload event: "%s"'; +export const UNABLE_TO_PARSE_AND_SKIPPED_HEADER = 'Unable to parse & skipped header item'; export const messages: string[] = []; diff --git a/lib/message/log_message.ts b/lib/message/log_message.ts index bbd1d110e..b4dc35650 100644 --- a/lib/message/log_message.ts +++ b/lib/message/log_message.ts @@ -14,47 +14,24 @@ * limitations under the License. */ -export const ACTIVATE_USER = '%s: Activating user %s in experiment %s.'; -export const DISPATCH_CONVERSION_EVENT = '%s: Dispatching conversion event to URL %s with params %s.'; -export const DISPATCH_IMPRESSION_EVENT = '%s: Dispatching impression event to URL %s with params %s.'; -export const DEPRECATED_EVENT_VALUE = '%s: Event value is deprecated in %s call.'; export const FEATURE_ENABLED_FOR_USER = 'Feature %s is enabled for user %s.'; export const FEATURE_NOT_ENABLED_FOR_USER = 'Feature %s is not enabled for user %s.'; -export const FAILED_TO_PARSE_VALUE = '%s: Failed to parse event value "%s" from event tags.'; +export const FAILED_TO_PARSE_VALUE = 'Failed to parse event value "%s" from event tags.'; export const FAILED_TO_PARSE_REVENUE = 'Failed to parse revenue value "%s" from event tags.'; export const INVALID_CLIENT_ENGINE = 'Invalid client engine passed: %s. Defaulting to node-sdk.'; -export const INVALID_DEFAULT_DECIDE_OPTIONS = '%s: Provided default decide options is not an array.'; +export const INVALID_DEFAULT_DECIDE_OPTIONS = 'Provided default decide options is not an array.'; export const INVALID_DECIDE_OPTIONS = 'Provided decide options is not an array. Using default decide options.'; export const NOT_ACTIVATING_USER = 'Not activating user %s for experiment %s.'; -export const ODP_DISABLED = 'ODP Disabled.'; -export const ODP_IDENTIFY_FAILED_ODP_DISABLED = '%s: ODP identify event for user %s is not dispatched (ODP disabled).'; -export const ODP_IDENTIFY_FAILED_ODP_NOT_INTEGRATED = - '%s: ODP identify event %s is not dispatched (ODP not integrated).'; -export const ODP_SEND_EVENT_IDENTIFIER_CONVERSION_FAILED = - '%s: sendOdpEvent failed to parse through and convert fs_user_id aliases'; export const PARSED_REVENUE_VALUE = 'Parsed revenue value "%s" from event tags.'; export const PARSED_NUMERIC_VALUE = 'Parsed event value "%s" from event tags.'; export const SAVED_USER_VARIATION = 'Saved user profile for user "%s".'; -export const UPDATED_USER_VARIATION = '%s: Updated variation "%s" of experiment "%s" for user "%s".'; export const SAVED_VARIATION_NOT_FOUND = 'User %s was previously bucketed into variation with ID %s for experiment %s, but no matching variation was found.'; export const SHOULD_NOT_DISPATCH_ACTIVATE = 'Experiment %s is not in "Running" state. Not activating user.'; export const SKIPPING_JSON_VALIDATION = 'Skipping JSON schema validation.'; export const TRACK_EVENT = 'Tracking event %s for user %s.'; -export const USER_IN_FEATURE_EXPERIMENT = '%s: User %s is in variation %s of experiment %s on the feature %s.'; -export const USER_NOT_BUCKETED_INTO_EVERYONE_TARGETING_RULE = - '%s: User %s not bucketed into everyone targeting rule due to traffic allocation.'; -export const USER_NOT_BUCKETED_INTO_ANY_EXPERIMENT_IN_GROUP = '%s: User %s is not in any experiment of group %s.'; export const USER_MAPPED_TO_FORCED_VARIATION = 'Set variation %s for experiment %s and user %s in the forced variation map.'; -export const USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED = - 'Variation (%s) is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.'; -export const USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED = - 'Variation (%s) is mapped to flag (%s) and user (%s) in the forced decision map.'; -export const USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID = - 'Invalid variation is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.'; -export const USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID = - 'Invalid variation is mapped to flag (%s) and user (%s) in the forced decision map.'; export const USER_HAS_NO_FORCED_VARIATION = 'User %s is not in the forced variation map.'; export const USER_RECEIVED_DEFAULT_VARIABLE_VALUE = 'User "%s" is not in any variation or rollout rule. Returning default value for variable "%s" of feature flag "%s".'; @@ -75,12 +52,13 @@ export const MISSING_ATTRIBUTE_VALUE = export const UNEXPECTED_TYPE_NULL = 'Audience condition %s evaluated to UNKNOWN because a null value was passed for user attribute "%s".'; export const UPDATED_OPTIMIZELY_CONFIG = 'Updated Optimizely config to revision %s (project id %s)'; -export const UNABLE_TO_PARSE_AND_SKIPPED_HEADER = 'Unable to parse & skipped header item'; export const ADDING_AUTHORIZATION_HEADER_WITH_BEARER_TOKEN = 'Adding Authorization header with Bearer Token'; export const MAKING_DATAFILE_REQ_TO_URL_WITH_HEADERS = 'Making datafile request to url %s with headers: %s'; export const RESPONSE_STATUS_CODE = 'Response status code: %s'; export const SAVED_LAST_MODIFIED_HEADER_VALUE_FROM_RESPONSE = 'Saved last modified header value from response: %s'; export const USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT = 'No experiment %s mapped to user %s in the forced variation map.'; +export const INVALID_EXPERIMENT_KEY_INFO = + 'Experiment key %s is not in datafile. It is either invalid, paused, or archived.'; export const messages: string[] = []; diff --git a/lib/odp/event_manager/odp_event_manager.ts b/lib/odp/event_manager/odp_event_manager.ts index 11d4b37f1..75c1a632c 100644 --- a/lib/odp/event_manager/odp_event_manager.ts +++ b/lib/odp/event_manager/odp_event_manager.ts @@ -25,7 +25,7 @@ import { isSuccessStatusCode } from '../../utils/http_request_handler/http_util' import { ODP_DEFAULT_EVENT_TYPE, ODP_USER_KEY } from '../constant'; import { EVENT_ACTION_INVALID, - EVENT_DATA_FOUND_TO_BE_INVALID, + EVENT_DATA_INVALID, FAILED_TO_SEND_ODP_EVENTS, ODP_EVENT_MANAGER_IS_NOT_RUNNING, ODP_EVENTS_SHOULD_HAVE_ATLEAST_ONE_KEY_VALUE, @@ -179,7 +179,7 @@ export class DefaultOdpEventManager extends BaseService implements OdpEventManag } if (!this.isDataValid(event.data)) { - this.logger?.error(EVENT_DATA_FOUND_TO_BE_INVALID); + this.logger?.error(EVENT_DATA_INVALID); return; } diff --git a/lib/optimizely/index.tests.js b/lib/optimizely/index.tests.js index 1d542beb2..3f5e536ba 100644 --- a/lib/optimizely/index.tests.js +++ b/lib/optimizely/index.tests.js @@ -58,7 +58,7 @@ import { NO_VARIATION_FOR_EXPERIMENT_KEY, USER_NOT_IN_FORCED_VARIATION, INSTANCE_CLOSED, - ONREADY_TIMEOUT_EXPIRED, + ONREADY_TIMEOUT, } from 'error_message'; import { @@ -9466,7 +9466,7 @@ describe('lib/optimizely', function() { return readyPromise.then(() => { return Promise.reject(new Error('PROMISE_SHOULD_NOT_HAVE_RESOLVED')); }, (err) => { - assert.equal(err.baseMessage, ONREADY_TIMEOUT_EXPIRED); + assert.equal(err.baseMessage, ONREADY_TIMEOUT); assert.deepEqual(err.params, [ 500 ]); }); }); @@ -9491,7 +9491,7 @@ describe('lib/optimizely', function() { return readyPromise.then(() => { return Promise.reject(new Error(PROMISE_SHOULD_NOT_HAVE_RESOLVED)); }, (err) => { - assert.equal(err.baseMessage, ONREADY_TIMEOUT_EXPIRED); + assert.equal(err.baseMessage, ONREADY_TIMEOUT); assert.deepEqual(err.params, [ 30000 ]); }); }); diff --git a/lib/optimizely/index.ts b/lib/optimizely/index.ts index b0e3a2f87..351b538d7 100644 --- a/lib/optimizely/index.ts +++ b/lib/optimizely/index.ts @@ -66,7 +66,6 @@ import { resolvablePromise } from '../utils/promise/resolvablePromise'; import { NOTIFICATION_TYPES, DecisionNotificationType, DECISION_NOTIFICATION_TYPES } from '../notification_center/type'; import { FEATURE_NOT_IN_DATAFILE, - INVALID_EXPERIMENT_KEY, INVALID_INPUT_FORMAT, NO_EVENT_PROCESSOR, ODP_EVENT_FAILED, @@ -88,6 +87,7 @@ import { INVALID_CLIENT_ENGINE, INVALID_DECIDE_OPTIONS, INVALID_DEFAULT_DECIDE_OPTIONS, + INVALID_EXPERIMENT_KEY_INFO, NOT_ACTIVATING_USER, SHOULD_NOT_DISPATCH_ACTIVATE, TRACK_EVENT, @@ -452,7 +452,7 @@ export default class Optimizely implements Client { const experiment = configObj.experimentKeyMap[experimentKey]; if (!experiment || experiment.isRollout) { - this.logger?.debug(INVALID_EXPERIMENT_KEY, experimentKey); + this.logger?.debug(INVALID_EXPERIMENT_KEY_INFO, experimentKey); return null; } diff --git a/lib/optimizely_user_context/index.tests.js b/lib/optimizely_user_context/index.tests.js index f30a21984..a71be212e 100644 --- a/lib/optimizely_user_context/index.tests.js +++ b/lib/optimizely_user_context/index.tests.js @@ -33,7 +33,7 @@ import { USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID, USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED, USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID, -} from 'log_message'; +} from '../core/decision_service'; const getMockEventDispatcher = () => { const dispatcher = { diff --git a/lib/project_config/polling_datafile_manager.ts b/lib/project_config/polling_datafile_manager.ts index 354823c58..a8fb9128b 100644 --- a/lib/project_config/polling_datafile_manager.ts +++ b/lib/project_config/polling_datafile_manager.ts @@ -115,7 +115,6 @@ export class PollingDatafileManager extends BaseService implements DatafileManag this.startPromise.reject(new OptimizelyError(DATAFILE_MANAGER_STOPPED)); } - this.logger?.debug(DATAFILE_MANAGER_STOPPED); this.state = ServiceState.Terminated; this.repeater.stop(); this.currentRequest?.abort(); diff --git a/lib/project_config/project_config.ts b/lib/project_config/project_config.ts index 38a4b42d6..a41347916 100644 --- a/lib/project_config/project_config.ts +++ b/lib/project_config/project_config.ts @@ -47,7 +47,7 @@ import { UNEXPECTED_RESERVED_ATTRIBUTE_PREFIX, UNRECOGNIZED_ATTRIBUTE, VARIABLE_KEY_NOT_IN_DATAFILE, - VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT, + VARIATION_ID_NOT_IN_DATAFILE, } from 'error_message'; import { SKIPPING_JSON_VALIDATION, VALID_DATAFILE } from 'log_message'; import { OptimizelyError } from '../error/optimizly_error'; @@ -693,7 +693,7 @@ export const getVariableValueForVariation = function( } if (!projectConfig.variationVariableUsageMap.hasOwnProperty(variation.id)) { - logger?.error(VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT, variation.id); + logger?.error(VARIATION_ID_NOT_IN_DATAFILE, variation.id); return null; } diff --git a/lib/utils/http_request_handler/request_handler.browser.ts b/lib/utils/http_request_handler/request_handler.browser.ts index a85137dad..340dcca33 100644 --- a/lib/utils/http_request_handler/request_handler.browser.ts +++ b/lib/utils/http_request_handler/request_handler.browser.ts @@ -17,8 +17,7 @@ import { AbortableRequest, Headers, RequestHandler, Response } from './http'; import { LoggerFacade, LogLevel } from '../../logging/logger'; import { REQUEST_TIMEOUT_MS } from '../enums'; -import { REQUEST_ERROR, REQUEST_TIMEOUT } from 'error_message'; -import { UNABLE_TO_PARSE_AND_SKIPPED_HEADER } from 'log_message'; +import { REQUEST_ERROR, REQUEST_TIMEOUT, UNABLE_TO_PARSE_AND_SKIPPED_HEADER } from 'error_message'; import { OptimizelyError } from '../../error/optimizly_error'; /**