From a8ddcfecb4da5e66906098fdd483347de3752e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Paw=C5=82owski?= Date: Fri, 6 Dec 2024 10:14:31 +0100 Subject: [PATCH] SNOW-1801434-Add-GUID-to-request-in-NODE.js-driver: IncludeGuid changed to ExcludeGuid --- index.d.ts | 4 ++-- lib/services/sf.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index f90069015..2ba49cb62 100644 --- a/index.d.ts +++ b/index.d.ts @@ -619,9 +619,9 @@ declare module 'snowflake-sdk' { * The request GUID is a unique identifier of an HTTP request issued to Snowflake. * Unlike the requestId, it is regenerated even when the request is resend with the retry mechanism. * If not specified, request GUIDs are attached to all requests to Snowflake for better traceability. - * In the majority of cases it should not be set or filled with true value. + * In the majority of cases it should not be set or filled with false value. */ - includeGuid?: string; + excludeGuid?: string; /** * Use different rest endpoints based on whether the query id is available. diff --git a/lib/services/sf.js b/lib/services/sf.js index de8ebe447..27dfd23d6 100644 --- a/lib/services/sf.js +++ b/lib/services/sf.js @@ -585,7 +585,7 @@ function StateAbstract(options) { function sendHttpRequest(requestOptions, httpClient, auth) { const params = requestOptions.params || {}; - if (requestOptions.includeGuid) { + if (!requestOptions.excludeGuid) { addGuidToParams(params); } @@ -730,7 +730,7 @@ function StateAbstract(options) { this.preprocessOptions(this.requestOptions); const params = this.requestOptions.params || {}; - if (this.requestOptions.includeGuid) { + if (!this.requestOptions.excludeGuid) { addGuidToParams(params); } const options = @@ -787,7 +787,7 @@ function StateAbstract(options) { // augment the options with the absolute url requestOptions.absoluteUrl = this.buildFullUrl(requestOptions.url); - requestOptions.includeGuid = Util.exists(requestOptions.includeGuid) ? requestOptions.includeGuid : true; + requestOptions.excludeGuid = !Util.exists(requestOptions.excludeGuid) ? true : requestOptions.excludeGuid; }; /**