@kiminix/tp-client 1.16.0 → 1.17.0

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.
@@ -172,17 +172,17 @@ var ReservationsAdminAPIs = /** @class */ (function () {
172
172
  .catch(function (error) {
173
173
  // handle error
174
174
  if (error.response.status == 401)
175
- return Left(new Error("unauthorized"));
175
+ return Left(Error("unauthorized"));
176
176
  else if (error.response.status == 404)
177
- return Left(new Error("not_found"));
177
+ return Left(Error("not_found"));
178
178
  else if (error.response.status == 400) {
179
179
  //unavailable_day
180
180
  //inactive_manual_booking
181
181
  var response = error.response.data;
182
- throw new Error(response.code);
182
+ return Left(Error(response.code));
183
183
  }
184
184
  else
185
- return Left(new Error('internal_error'));
185
+ return Left(Error('internal_error'));
186
186
  })];
187
187
  case 1: return [2 /*return*/, _a.sent()];
188
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [