ti2-ventrata 1.0.21 → 1.0.22

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/index.js +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -52,9 +52,13 @@ class Plugin {
52
52
  const pluginObj = this;
53
53
  this.axios = async (...args) => axiosRaw(...args).catch(err => {
54
54
  const errMsg = R.path(['response', 'data', 'errorMessage'], err);
55
- console.log('error in ti2-ventrata', args[0], errMsg);
55
+ console.log(`error in ${this.name}`, args[0], errMsg || err);
56
56
  if (pluginObj.events) {
57
- pluginObj.events.emit(`${this.name}.axios.error`, { request: args[0], err, errMsg });
57
+ pluginObj.events.emit(`${this.name}.axios.error`, {
58
+ request: args[0],
59
+ err: JSON.parse(JSON.stringify(err)),
60
+ errMsg,
61
+ });
58
62
  }
59
63
  if (errMsg) throw new Error(errMsg);
60
64
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-ventrata",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Ventrata's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {