diff --git a/lib/connection/connection_config.js b/lib/connection/connection_config.js index 9fdf70001..526f95a74 100644 --- a/lib/connection/connection_config.js +++ b/lib/connection/connection_config.js @@ -497,9 +497,9 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo) let includeRetryReason = true; if (Util.exists(options.includeRetryReason)) { Errors.checkArgumentValid(Util.isBoolean(options.includeRetryReason), - ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON); + ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON); - includeRetryReason = options.includeRetryReason; + includeRetryReason = options.includeRetryReason; } /** @@ -774,6 +774,7 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo) return includeRetryReason; } + /** * Returns whether the Query Context Cache is enabled or not by the configuration * * @returns {Boolean} diff --git a/lib/constants/error_messages.js b/lib/constants/error_messages.js index c56c04c4b..687c189ac 100644 --- a/lib/constants/error_messages.js +++ b/lib/constants/error_messages.js @@ -65,7 +65,7 @@ exports[404038] = 'Invalid gcsUseDownscopedCredential. The specified value must exports[404039] = 'Invalid forceStageBindError. The specified value must be a number.'; exports[404040] = 'Invalid browser timeout value. The specified value must be a positive number.'; exports[404041] = 'Invalid disablQueryContextCache. The specified value must be a boolean.'; -exports[404042] = 'Invalid include retry reason. The specified value must be a boolean.' +exports[404042] = 'Invalid includeRetryReason. The specified value must be a boolean.' // 405001 exports[405001] = 'Invalid callback. The specified value must be a function.'; diff --git a/test/unit/connection/connection_config_test.js b/test/unit/connection/connection_config_test.js index 3b661d705..7b16499d6 100644 --- a/test/unit/connection/connection_config_test.js +++ b/test/unit/connection/connection_config_test.js @@ -515,26 +515,26 @@ describe('ConnectionConfig: basic', function () errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_GCS_USE_DOWNSCOPED_CREDENTIAL }, { - name: 'invalid includeRetryReason', + name: 'invalid disableQueryContextCache', options: { username: 'username', password: 'password', account: 'account', - includeRetryReason: 'invalid' + disableQueryContextCache: 1234 }, - errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON, + errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_DISABLED_QUERY_CONTEXT_CACHE, }, { - name: 'invalid disableQueryContextCache', + name: 'invalid includeRetryReason', options: { username: 'username', password: 'password', account: 'account', - disableQueryContextCache: 1234 + includeRetryReason: 'invalid' }, - errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_DISABLED_QUERY_CONTEXT_CACHE, + errorCode: ErrorCodes.ERR_CONN_CREATE_INVALID_INCLUDE_RETRY_REASON, }, ];