hof 21.0.9-axios-beta → 21.0.11-axios-beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/model/index.js +15 -10
  2. package/package.json +1 -1
package/model/index.js CHANGED
@@ -113,6 +113,9 @@ module.exports = class Model extends EventEmitter {
113
113
  if(authVal) {
114
114
  settings.headers = Object.assign({}, settings.headers, {Authorization: `Bearer ${authVal.bearer}`});
115
115
  }
116
+ console.log("SETTINGS ************")
117
+ console.log(settings)
118
+ console.log("SETTINGS ************")
116
119
  })
117
120
  .then(() => {
118
121
  const startTime = process.hrtime();
@@ -128,22 +131,24 @@ module.exports = class Model extends EventEmitter {
128
131
  const endTime = process.hrtime();
129
132
  const responseTime = timeDiff(startTime, endTime);
130
133
  if (err) {
134
+ console.log("*****ERRR********")
135
+ console.log(err)
136
+ console.log("*****ERRR********")
131
137
  this.emit('fail', err, data, originalSettings, statusCode, responseTime);
138
+ reject(err);
132
139
  } else {
133
140
  console.log("SUCCESS>>>>>>>>>>>>>>>")
134
141
  this.emit('success', data, originalSettings, statusCode, responseTime);
135
- }
136
- console.log("*****ERRR********")
137
- console.log(err)
138
- console.log("*****ERRR********")
139
- if (err) {
140
- console.log("err11")
141
- console.log(err)
142
- console.log("err11")
143
- reject(err);
144
- } else {
145
142
  resolve(data);
146
143
  }
144
+ // if (err) {
145
+ // console.log("err11")
146
+ // console.log(err)
147
+ // console.log("err11")
148
+ // reject(err);
149
+ // } else {
150
+ // resolve(data);
151
+ // }
147
152
  };
148
153
  this._request(settings)
149
154
  .then(response => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "21.0.9-axios-beta",
4
+ "version": "21.0.11-axios-beta",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",