@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(
|
|
175
|
+
return Left(Error("unauthorized"));
|
|
176
176
|
else if (error.response.status == 404)
|
|
177
|
-
return Left(
|
|
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
|
-
|
|
182
|
+
return Left(Error(response.code));
|
|
183
183
|
}
|
|
184
184
|
else
|
|
185
|
-
return Left(
|
|
185
|
+
return Left(Error('internal_error'));
|
|
186
186
|
})];
|
|
187
187
|
case 1: return [2 /*return*/, _a.sent()];
|
|
188
188
|
}
|