@devcycle/nodejs-server-sdk
Advanced tools
Comparing version 1.33.1 to 1.33.2
@@ -39,3 +39,2 @@ "use strict"; | ||
}; | ||
const projectConfig = (await res.json()); | ||
this.logger.debug(`Downloaded config, status: ${res === null || res === void 0 ? void 0 : res.status}, etag: ${res === null || res === void 0 ? void 0 : res.headers.get('etag')}`); | ||
@@ -46,3 +45,4 @@ if (res.status === 304) { | ||
} | ||
else if (res.status === 200 && projectConfig) { | ||
else if (res.status === 200) { | ||
const projectConfig = (await res.json()); | ||
const lastModifiedHeader = res.headers.get('last-modified'); | ||
@@ -49,0 +49,0 @@ if (this.isLastModifiedHeaderOld(lastModifiedHeader !== null && lastModifiedHeader !== void 0 ? lastModifiedHeader : null)) { |
@@ -155,3 +155,2 @@ "use strict"; | ||
let retrievalMetadata; | ||
let userError = null; | ||
const startTime = Date.now(); | ||
@@ -195,4 +194,8 @@ let responseTimeMS = 0; | ||
if (ex instanceof server_request_1.UserError) { | ||
userError = ex; | ||
this.cleanup(); | ||
throw ex; | ||
} | ||
else if (this._hasConfig) { | ||
this.logger.warn(`Failed to download config, using cached version. url: ${url}.`); | ||
} | ||
} | ||
@@ -212,10 +215,3 @@ if (projectConfig) { | ||
} | ||
if (this._hasConfig) { | ||
this.logger.warn(`Failed to download config, using cached version. url: ${url}.`); | ||
} | ||
else if (userError) { | ||
this.cleanup(); | ||
throw userError; | ||
} | ||
else { | ||
if (!this._hasConfig) { | ||
throw new Error('Failed to download DevCycle config.'); | ||
@@ -222,0 +218,0 @@ } |
@@ -39,3 +39,2 @@ "use strict"; | ||
}; | ||
const projectConfig = (await res.json()); | ||
this.logger.debug(`Downloaded config, status: ${res === null || res === void 0 ? void 0 : res.status}, etag: ${res === null || res === void 0 ? void 0 : res.headers.get('etag')}`); | ||
@@ -46,3 +45,4 @@ if (res.status === 304) { | ||
} | ||
else if (res.status === 200 && projectConfig) { | ||
else if (res.status === 200) { | ||
const projectConfig = (await res.json()); | ||
const lastModifiedHeader = res.headers.get('last-modified'); | ||
@@ -49,0 +49,0 @@ if (this.isLastModifiedHeaderOld(lastModifiedHeader !== null && lastModifiedHeader !== void 0 ? lastModifiedHeader : null)) { |
@@ -155,3 +155,2 @@ "use strict"; | ||
let retrievalMetadata; | ||
let userError = null; | ||
const startTime = Date.now(); | ||
@@ -195,4 +194,8 @@ let responseTimeMS = 0; | ||
if (ex instanceof server_request_1.UserError) { | ||
userError = ex; | ||
this.cleanup(); | ||
throw ex; | ||
} | ||
else if (this._hasConfig) { | ||
this.logger.warn(`Failed to download config, using cached version. url: ${url}.`); | ||
} | ||
} | ||
@@ -212,10 +215,3 @@ if (projectConfig) { | ||
} | ||
if (this._hasConfig) { | ||
this.logger.warn(`Failed to download config, using cached version. url: ${url}.`); | ||
} | ||
else if (userError) { | ||
this.cleanup(); | ||
throw userError; | ||
} | ||
else { | ||
if (!this._hasConfig) { | ||
throw new Error('Failed to download DevCycle config.'); | ||
@@ -222,0 +218,0 @@ } |
{ | ||
"name": "@devcycle/nodejs-server-sdk", | ||
"version": "1.33.1", | ||
"version": "1.33.2", | ||
"description": "The DevCycle NodeJS Server SDK used for feature management.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,3 +7,3 @@ import { DevCycleClient } from './client'; | ||
type DevCycleProvider = InstanceType<DevCycleProviderConstructor>; | ||
declare class DevCycleCloudClient<Variables extends VariableDefinitions = VariableDefinitions> extends InternalDevCycleCloudClient { | ||
declare class DevCycleCloudClient<Variables extends VariableDefinitions = VariableDefinitions> extends InternalDevCycleCloudClient<Variables> { | ||
private openFeatureProvider; | ||
@@ -10,0 +10,0 @@ constructor(sdkKey: string, options: DevCycleServerSDKOptions, platformDetails: DevCyclePlatformDetails); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
357833
3453