ntk-cms-api 18.3.461 → 18.3.462
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/fesm2020/ntk-cms-api.mjs
CHANGED
|
@@ -1145,6 +1145,7 @@ class ApiServerBase {
|
|
|
1145
1145
|
constructor(http) {
|
|
1146
1146
|
this.http = http;
|
|
1147
1147
|
this.baseUrl = 'https://apicms.ir/api/v2/';
|
|
1148
|
+
this.handleErrorCustom = null;
|
|
1148
1149
|
this.userToken = '';
|
|
1149
1150
|
this.deviceToken = '';
|
|
1150
1151
|
this.configApiRetry = 0;
|
|
@@ -1310,7 +1311,7 @@ class ApiServerBase {
|
|
|
1310
1311
|
return model;
|
|
1311
1312
|
}
|
|
1312
1313
|
handleError(error, caught) {
|
|
1313
|
-
if (this.handleErrorCustom)
|
|
1314
|
+
if (this.handleErrorCustom && this.handleErrorCustom != null && this.handleErrorCustom == undefined)
|
|
1314
1315
|
return this.handleErrorCustom(error, caught);
|
|
1315
1316
|
let errorMessage = error.message;
|
|
1316
1317
|
if (error && error.status) {
|