@netresearch/node-red-contrib-magento-eqp 3.0.1 → 3.0.3

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.
@@ -80,7 +80,7 @@ var MagentoEQPCallbackParser = /** @class */ (function (_super) {
80
80
  }
81
81
  _this.configNode = configNode;
82
82
  _this.on('input', function (msg) { return __awaiter(_this, void 0, void 0, function () {
83
- var payload, _a, err_1, error, httpResponse;
83
+ var payload, _a, err_1, error, httpResponse, httpError, errorString;
84
84
  return __generator(this, function (_b) {
85
85
  switch (_b.label) {
86
86
  case 0:
@@ -105,13 +105,15 @@ var MagentoEQPCallbackParser = /** @class */ (function (_super) {
105
105
  case 2:
106
106
  err_1 = _b.sent();
107
107
  error = err_1;
108
+ httpResponse = err_1 instanceof axios_1.AxiosError && !!err_1.response ? err_1.response.data : null;
109
+ httpError = httpResponse ? JSON.stringify(httpResponse) : '';
110
+ errorString = "".concat(error, ": ").concat(httpError);
108
111
  this.status({
109
112
  fill: 'red',
110
113
  shape: 'ring',
111
- text: error.toString()
114
+ text: errorString
112
115
  });
113
- httpResponse = err_1 instanceof axios_1.AxiosError && !!err_1.response ? err_1.response.data : null;
114
- this.send([null, __assign(__assign({}, error), { httpResponse: httpResponse })]);
116
+ this.send([null, __assign(__assign({}, error), { httpResponse: httpResponse, payload: errorString })]);
115
117
  return [3 /*break*/, 3];
116
118
  case 3: return [2 /*return*/];
117
119
  }
@@ -6,7 +6,6 @@
6
6
  defaults: {
7
7
  name: { value: '' },
8
8
  environment: { value: 'production', required: true },
9
- autoRefresh: { value: true }
10
9
  },
11
10
  credentials: {
12
11
  appId: { type: 'text' },
@@ -28,7 +27,7 @@
28
27
  <label for="node-config-input-environment"><i class="icon-tag" />Environment</label>
29
28
  <select id="node-config-input-environment">
30
29
  <option value="production">Production</option>
31
- <option value="staging">Staging</option>
30
+ <option value="sandbox">Sandbox</option>
32
31
  </select>
33
32
  </div>
34
33
 
@@ -39,7 +39,6 @@ var MagentoEQPConfig = /** @class */ (function (_super) {
39
39
  _this.appId = _this.credentials.appId;
40
40
  _this.appSecret = _this.credentials.appSecret;
41
41
  _this.environment = config.environment;
42
- _this.autoRefresh = config.autoRefresh;
43
42
  _this.eqp = new node_magento_eqp_1.EQP({
44
43
  environment: (_a = config.environment) !== null && _a !== void 0 ? _a : 'production',
45
44
  autoRefresh: (_b = config.autoRefresh) !== null && _b !== void 0 ? _b : true,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@netresearch/node-red-contrib-magento-eqp",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Node-RED module for parsing callbacks from the Magento Marketplace EQP API",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/netresearch/node-red-contrib-magento-eqp.git"
9
9
  },
10
- "author": "TheDevMinerTV <tobigames200@gmail.com>",
10
+ "author": "DevMiner <devminer@devminer.xyz>",
11
11
  "license": "MIT",
12
12
  "node-red": {
13
13
  "nodes": {