ywana-core8 0.1.24 → 0.1.26

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.
package/dist/index.umd.js CHANGED
@@ -87,16 +87,18 @@
87
87
  }();
88
88
  return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
89
89
  });
90
- }, function (error) {
91
- if (error instanceof Error) {
90
+ }, function (response) {
91
+ if (response instanceof Error) {
92
92
  throw {
93
- error: error
93
+ response: response
94
94
  };
95
95
  }
96
- return Promise.resolve(error.json()).then(function (json) {
96
+ return Promise.resolve(response.json()).then(function (json) {
97
97
  throw {
98
98
  success: false,
99
- message: json.message || json.err
99
+ message: json.message || json.err,
100
+ status: response.status,
101
+ statusText: response.statusText
100
102
  };
101
103
  });
102
104
  }));