roboto-js 1.3.17 → 1.3.18

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.
@@ -57,7 +57,7 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
57
57
  };
58
58
 
59
59
  // DEVELOPMENT
60
- this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost', 'rbt.dorfio.com', 'srv.dorfio.com']);
60
+ this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
61
61
 
62
62
  // Check if a request object is provided
63
63
  if (proxyReq && proxyReq.headers) {
@@ -81,7 +81,7 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
81
81
  key: "setAppServiceHost",
82
82
  value: function setAppServiceHost(host) {
83
83
  // DEVELOPMENT
84
- host = this._stripHttpsForDomains(host, ['localhost', 'rbt.dorfio.com']);
84
+ host = this._stripHttpsForDomains(host, ['localhost']);
85
85
  this.api.setAppServiceHost(host);
86
86
  }
87
87
  }, {
@@ -1031,7 +1031,13 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
1031
1031
  if (res) return;
1032
1032
  }
1033
1033
  if (_lodash["default"].isObject(err) && _lodash["default"].get(err, 'response')) {
1034
- console.log('RbtAPI handleError', err);
1034
+ if (err.response) {
1035
+ console.log('Error response:', {
1036
+ data: err.response.data,
1037
+ status: err.response.status,
1038
+ headers: err.response.headers
1039
+ });
1040
+ }
1035
1041
  var msg = _lodash["default"].get(err, 'response.data.message', 'Error in API response');
1036
1042
  if (msg.key) {
1037
1043
  throw new Error(msg.key);
@@ -137,9 +137,10 @@ var RbtObject = exports["default"] = /*#__PURE__*/function () {
137
137
  _context.prev = 17;
138
138
  _context.t0 = _context["catch"](2);
139
139
  console.log('RbtObject.save.error:', _context.t0);
140
+ this._error = _context.t0;
140
141
  //console.log(e.response.data);
141
142
  throw _context.t0;
142
- case 21:
143
+ case 22:
143
144
  case "end":
144
145
  return _context.stop();
145
146
  }
package/dist/esm/index.js CHANGED
@@ -26,7 +26,7 @@ export default class Roboto {
26
26
  };
27
27
 
28
28
  // DEVELOPMENT
29
- this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost', 'rbt.dorfio.com', 'srv.dorfio.com']);
29
+ this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
30
30
 
31
31
  // Check if a request object is provided
32
32
  if (proxyReq && proxyReq.headers) {
@@ -48,7 +48,7 @@ export default class Roboto {
48
48
  }
49
49
  setAppServiceHost(host) {
50
50
  // DEVELOPMENT
51
- host = this._stripHttpsForDomains(host, ['localhost', 'rbt.dorfio.com']);
51
+ host = this._stripHttpsForDomains(host, ['localhost']);
52
52
  this.api.setAppServiceHost(host);
53
53
  }
54
54
  setErrorHandler(customErrorHandler) {
@@ -568,7 +568,13 @@ export default class RbtApi {
568
568
  if (res) return;
569
569
  }
570
570
  if (_.isObject(err) && _.get(err, 'response')) {
571
- console.log('RbtAPI handleError', err);
571
+ if (err.response) {
572
+ console.log('Error response:', {
573
+ data: err.response.data,
574
+ status: err.response.status,
575
+ headers: err.response.headers
576
+ });
577
+ }
572
578
  const msg = _.get(err, 'response.data.message', 'Error in API response');
573
579
  if (msg.key) {
574
580
  throw new Error(msg.key);
@@ -86,6 +86,7 @@ export default class RbtObject {
86
86
  return this;
87
87
  } catch (e) {
88
88
  console.log('RbtObject.save.error:', e);
89
+ this._error = e;
89
90
  //console.log(e.response.data);
90
91
  throw e;
91
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roboto-js",
3
- "version": "1.3.17",
3
+ "version": "1.3.18",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.cjs",
package/src/index.js CHANGED
@@ -30,7 +30,7 @@ export default class Roboto{
30
30
  };
31
31
 
32
32
  // DEVELOPMENT
33
- this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost', 'rbt.dorfio.com', 'srv.dorfio.com']);
33
+ this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
34
34
 
35
35
  // Check if a request object is provided
36
36
  if (proxyReq && proxyReq.headers) {
@@ -56,7 +56,7 @@ export default class Roboto{
56
56
  setAppServiceHost(host){
57
57
 
58
58
  // DEVELOPMENT
59
- host = this._stripHttpsForDomains(host, ['localhost','rbt.dorfio.com']);
59
+ host = this._stripHttpsForDomains(host, ['localhost']);
60
60
 
61
61
  this.api.setAppServiceHost(host);
62
62
 
package/src/rbt_api.js CHANGED
@@ -593,7 +593,13 @@ export default class RbtApi {
593
593
 
594
594
  if (_.isObject(err) && _.get(err, 'response')) {
595
595
 
596
- console.log('RbtAPI handleError', err);
596
+ if (err.response) {
597
+ console.log('Error response:', {
598
+ data: err.response.data,
599
+ status: err.response.status,
600
+ headers: err.response.headers
601
+ });
602
+ }
597
603
 
598
604
  const msg = _.get(err, 'response.data.message', 'Error in API response');
599
605
 
package/src/rbt_object.js CHANGED
@@ -105,6 +105,7 @@ export default class RbtObject {
105
105
 
106
106
  } catch (e) {
107
107
  console.log('RbtObject.save.error:', e);
108
+ this._error = e;
108
109
  //console.log(e.response.data);
109
110
  throw e;
110
111
  }