hof 21.0.6-axios-beta → 21.0.8-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 +10 -0
  2. package/package.json +1 -1
package/model/index.js CHANGED
@@ -48,6 +48,7 @@ module.exports = class Model extends EventEmitter {
48
48
 
49
49
  reqConf.headers = Object.assign({
50
50
  'Content-Type': 'application/json',
51
+ 'User-Agent': 'Axios 0.25.0',
51
52
  'Content-Length': Buffer.byteLength(data)
52
53
  }, reqConf.headers || {});
53
54
  return this.request(reqConf, data, callback);
@@ -129,6 +130,12 @@ module.exports = class Model extends EventEmitter {
129
130
  const endTime = process.hrtime();
130
131
  const responseTime = timeDiff(startTime, endTime);
131
132
  if (err) {
133
+ console.log("heerrererererer444")
134
+ console.log("d",data)
135
+ console.log("e",err)
136
+ console.log("os", originalSettings)
137
+ console.log("sc", statusCode)
138
+ console.log("rt", responseTime)
132
139
  console.log("heerrererererer444")
133
140
  this.emit('fail', err, data, originalSettings, statusCode, responseTime);
134
141
  } else {
@@ -136,6 +143,9 @@ module.exports = class Model extends EventEmitter {
136
143
  this.emit('success', data, originalSettings, statusCode, responseTime);
137
144
  }
138
145
  if (err) {
146
+ console.log("err11")
147
+ console.log(err)
148
+ console.log("err11")
139
149
  reject(err);
140
150
  } else {
141
151
  resolve(data);
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.6-axios-beta",
4
+ "version": "21.0.8-axios-beta",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",