idosell 0.1.9 → 0.1.10

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/dist/request.js +1 -1
  2. package/package.json +1 -1
package/dist/request.js CHANGED
@@ -8,7 +8,7 @@ const DECODE_TABLE = [
8
8
  ]
9
9
 
10
10
  const catchIdosellError = (err) => {
11
- if (err.response.headers['content-type'].indexOf('json') < 0) throw new Error('500: Invalid response from Api gateway');
11
+ if (!err.response.headers['x-error'] &&err.response.headers['content-type'].indexOf('json') < 0) throw new Error('500: Invalid response from Api gateway');
12
12
  let message = err.response.headers['x-error'];
13
13
  for (const [ search, replace ] of DECODE_TABLE) {
14
14
  message = message.replaceAll(search, replace);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idosell",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Idosell 3 REST connector",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {