jscrambler 6.4.7 → 6.4.9
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.js +13 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -302,11 +302,19 @@ var _default = {
|
|
|
302
302
|
}
|
|
303
303
|
_context4.next = 16;
|
|
304
304
|
return _this2.getApplicationProfiling(client, applicationId).catch(function (e) {
|
|
305
|
-
if (
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
if (typeof profilingDataMode === 'string' && profilingDataMode !== 'off') {
|
|
306
|
+
switch (e.statusCode) {
|
|
307
|
+
case _constants.HTTP_STATUS_CODES.FORBIDDEN:
|
|
308
|
+
throw new Error("No ".concat(profilingDataMode, " profiling feature in your plan. Please set profilingDataMode to \"off\" or contact the Jscrambler Support."));
|
|
309
|
+
case _constants.HTTP_STATUS_CODES.NOT_FOUND:
|
|
310
|
+
if (profilingDataMode === 'automatic') {
|
|
311
|
+
throw new Error('You can not use the automatic mode without previous profiling having been done.');
|
|
312
|
+
}
|
|
313
|
+
break;
|
|
314
|
+
case _constants.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE:
|
|
315
|
+
if (profilingDataMode === 'automatic') {
|
|
316
|
+
throw e;
|
|
317
|
+
}
|
|
310
318
|
}
|
|
311
319
|
}
|
|
312
320
|
});
|