Skip to content

Commit

Permalink
SNOW-1801434-Add-GUID-to-request-in-NODE.js-driver: IncludeGuid chang…
Browse files Browse the repository at this point in the history
…ed to ExcludeGuid
  • Loading branch information
sfc-gh-fpawlowski committed Dec 6, 2024
1 parent 31496c8 commit a8ddcfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions lib/services/sf.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ function StateAbstract(options) {
function sendHttpRequest(requestOptions, httpClient, auth) {

const params = requestOptions.params || {};
if (requestOptions.includeGuid) {
if (!requestOptions.excludeGuid) {
addGuidToParams(params);
}

Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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;
};

/**
Expand Down

0 comments on commit a8ddcfe

Please sign in to comment.