expf-sigma-node.js 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/sigma.js +4 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expf-sigma-node.js",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "expf-sigma-node.js lets you manage features flags and remote config across web, server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
5
5
  "main": "public/sigma.js",
6
6
  "keywords": [
package/public/sigma.js CHANGED
@@ -970,7 +970,7 @@ var Sigma = class {
970
970
  this.retries
971
971
  );
972
972
  if (data.status !== 200) {
973
- throw new Error(`Sending data, status: ${data.status}`);
973
+ throw new Error(`${data.status} Token: ${this.token}`);
974
974
  }
975
975
  return data.json();
976
976
  }
@@ -979,7 +979,7 @@ var Sigma = class {
979
979
  const data = await this.getDataFile(`${this.api}/geo`);
980
980
  return data;
981
981
  } catch (error) {
982
- throw new Error(error);
982
+ throw new Error(`Get geo: ${error}`);
983
983
  }
984
984
  }
985
985
  async saveToCache() {
@@ -1011,13 +1011,9 @@ var Sigma = class {
1011
1011
  data = await this.getDataFile(`${api}/config.json`);
1012
1012
  } catch (error) {
1013
1013
  if (!this.cache.get(sigmaDataFile)) {
1014
- throw new Error(`
1015
- Get data: ${error},
1016
- token: ${this.token},
1017
- url: ${this.api}/config.json
1018
- `);
1014
+ throw new Error(` Get config: ${error}`);
1019
1015
  } else {
1020
- console.error(`Get data config.json: ${error}`);
1016
+ console.error(`Get config: ${error}`);
1021
1017
  return true;
1022
1018
  }
1023
1019
  }