jamespot-front-business 1.1.90 → 1.1.91
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/cjs.js +61 -64
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +61 -64
- package/dist/esm.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs.js
CHANGED
|
@@ -57,9 +57,16 @@ const isAbortError = (error) => {
|
|
|
57
57
|
return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
|
|
58
58
|
};
|
|
59
59
|
const getErrorMessage = (error, defaultError) => {
|
|
60
|
-
|
|
61
|
-
?
|
|
62
|
-
|
|
60
|
+
if (!error || typeof error !== 'object') {
|
|
61
|
+
return defaultError !== null && defaultError !== void 0 ? defaultError : 'GLOBAL_Technical_Error';
|
|
62
|
+
}
|
|
63
|
+
if ('errorMsg' in error && typeof error.errorMsg === 'string') {
|
|
64
|
+
return error.errorMsg;
|
|
65
|
+
}
|
|
66
|
+
if ('message' in error && typeof error.message === 'string') {
|
|
67
|
+
return error.message;
|
|
68
|
+
}
|
|
69
|
+
return defaultError !== null && defaultError !== void 0 ? defaultError : 'GLOBAL_Technical_Error';
|
|
63
70
|
};
|
|
64
71
|
|
|
65
72
|
const toastAdapter = toolkit.createEntityAdapter({
|
|
@@ -130,7 +137,7 @@ const fetchLogsNavigation = toolkit.createAsyncThunk('admin/fetchLogsNavigation'
|
|
|
130
137
|
}
|
|
131
138
|
catch (err) {
|
|
132
139
|
if (!isAbortError(err)) {
|
|
133
|
-
dispatch(Toast.actions.error({ label:
|
|
140
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
134
141
|
}
|
|
135
142
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs navigation' });
|
|
136
143
|
}
|
|
@@ -200,7 +207,7 @@ const fetchLogsObjects = toolkit.createAsyncThunk('admin/fetchLogsObjects', (par
|
|
|
200
207
|
}
|
|
201
208
|
catch (err) {
|
|
202
209
|
if (!isAbortError(err)) {
|
|
203
|
-
dispatch(Toast.actions.error({ label:
|
|
210
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
204
211
|
}
|
|
205
212
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Objects' });
|
|
206
213
|
}
|
|
@@ -269,7 +276,7 @@ const fetchLogsSearch = toolkit.createAsyncThunk('admin/fetchLogsSearch', (param
|
|
|
269
276
|
}
|
|
270
277
|
catch (err) {
|
|
271
278
|
if (!isAbortError(err)) {
|
|
272
|
-
dispatch(Toast.actions.error({ label:
|
|
279
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
273
280
|
}
|
|
274
281
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Search' });
|
|
275
282
|
}
|
|
@@ -369,7 +376,7 @@ const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentA
|
|
|
369
376
|
}
|
|
370
377
|
catch (err) {
|
|
371
378
|
if (!isAbortError(err)) {
|
|
372
|
-
dispatch(Toast.actions.error({ label:
|
|
379
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
373
380
|
}
|
|
374
381
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
375
382
|
}
|
|
@@ -378,8 +385,8 @@ const fetchCurrentAnimationApp = toolkit.createAsyncThunk('animations/fetchCurre
|
|
|
378
385
|
try {
|
|
379
386
|
return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
|
|
380
387
|
}
|
|
381
|
-
catch (
|
|
382
|
-
dispatch(Toast.actions.error({ label:
|
|
388
|
+
catch (err) {
|
|
389
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
383
390
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
384
391
|
}
|
|
385
392
|
}));
|
|
@@ -388,8 +395,8 @@ const deleteCurrentAnimation = toolkit.createAsyncThunk('animations/deleteCurren
|
|
|
388
395
|
yield extra.jApi.animations.DeleteAnimation();
|
|
389
396
|
return;
|
|
390
397
|
}
|
|
391
|
-
catch (
|
|
392
|
-
dispatch(Toast.actions.error({ label:
|
|
398
|
+
catch (err) {
|
|
399
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
393
400
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
|
|
394
401
|
}
|
|
395
402
|
}));
|
|
@@ -398,8 +405,8 @@ const saveCurrentAnimation = toolkit.createAsyncThunk('animations/saveCurrentAni
|
|
|
398
405
|
yield extra.jApi.animations.SaveAnimationConfiguration(params);
|
|
399
406
|
return;
|
|
400
407
|
}
|
|
401
|
-
catch (
|
|
402
|
-
dispatch(Toast.actions.error({ label:
|
|
408
|
+
catch (err) {
|
|
409
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
403
410
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
404
411
|
}
|
|
405
412
|
}));
|
|
@@ -408,8 +415,8 @@ const toggleAnimationIsActive = toolkit.createAsyncThunk('animations/toggleAnima
|
|
|
408
415
|
yield extra.jApi.animations.ToggleAnimationActive();
|
|
409
416
|
return;
|
|
410
417
|
}
|
|
411
|
-
catch (
|
|
412
|
-
dispatch(Toast.actions.error({ label:
|
|
418
|
+
catch (err) {
|
|
419
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
413
420
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
414
421
|
}
|
|
415
422
|
}));
|
|
@@ -456,8 +463,8 @@ const fetchAnimationStats = toolkit.createAsyncThunk('animations/fetchAnimationS
|
|
|
456
463
|
const stats = (yield extra.jApi.animations.GetAnimationStats(name)).result.data;
|
|
457
464
|
return stats;
|
|
458
465
|
}
|
|
459
|
-
catch (
|
|
460
|
-
dispatch(Toast.actions.error({ label:
|
|
466
|
+
catch (err) {
|
|
467
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
461
468
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation stats' });
|
|
462
469
|
}
|
|
463
470
|
}));
|
|
@@ -488,8 +495,8 @@ const fetchAnimationStatsCurrent = toolkit.createAsyncThunk('animations/fetchAni
|
|
|
488
495
|
const stats = (yield extra.jApi.animations.GetAnimationStatsCurrent(uri)).result;
|
|
489
496
|
return stats;
|
|
490
497
|
}
|
|
491
|
-
catch (
|
|
492
|
-
dispatch(Toast.actions.error({ label:
|
|
498
|
+
catch (err) {
|
|
499
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
493
500
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation stats current' });
|
|
494
501
|
}
|
|
495
502
|
}));
|
|
@@ -853,13 +860,12 @@ const fetchBookmark = toolkit.createAsyncThunk('bookmarkList/fetchbookmarkList',
|
|
|
853
860
|
try {
|
|
854
861
|
return yield extra.jApi.bookmark.getFormattedList(filterSpec, 'raw-list');
|
|
855
862
|
}
|
|
856
|
-
catch (
|
|
857
|
-
dispatch(Toast.actions.error({ label:
|
|
863
|
+
catch (err) {
|
|
864
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
858
865
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve bookmarks' });
|
|
859
866
|
}
|
|
860
867
|
}));
|
|
861
868
|
const addBookmark = toolkit.createAsyncThunk('bookmarkList/addBookmark', (bookmark, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
862
|
-
var _a;
|
|
863
869
|
try {
|
|
864
870
|
if (jamespot.jEnsure.isBookmarkLink(bookmark)) {
|
|
865
871
|
const result = yield extra.jApi.bookmark.addFormattedLink(bookmark.targetId, bookmark.targetType, 'raw-list');
|
|
@@ -871,7 +877,7 @@ const addBookmark = toolkit.createAsyncThunk('bookmarkList/addBookmark', (bookma
|
|
|
871
877
|
}
|
|
872
878
|
}
|
|
873
879
|
catch (error) {
|
|
874
|
-
const toastLabel = (
|
|
880
|
+
const toastLabel = getErrorMessage(error);
|
|
875
881
|
dispatch(Toast.actions.error({ label: toastLabel }));
|
|
876
882
|
return rejectWithValue({ error: 1, errorMsg: 'Error saving bookmark' });
|
|
877
883
|
}
|
|
@@ -881,8 +887,8 @@ const moveBookmark = toolkit.createAsyncThunk('bookmarkList/moveBookmark', ({ bo
|
|
|
881
887
|
yield extra.jApi.bookmark.move(bookmark.id, bookmarkReference.id, position);
|
|
882
888
|
return;
|
|
883
889
|
}
|
|
884
|
-
catch (
|
|
885
|
-
dispatch(Toast.actions.error({ label:
|
|
890
|
+
catch (err) {
|
|
891
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
886
892
|
return rejectWithValue({ error: 1, errorMsg: 'Error moving bookmark' });
|
|
887
893
|
}
|
|
888
894
|
}));
|
|
@@ -891,8 +897,8 @@ const deleteBookmark = toolkit.createAsyncThunk('bookmarkList/deleteBookmark', (
|
|
|
891
897
|
yield extra.jApi.bookmark.delete(bookmark.id);
|
|
892
898
|
return;
|
|
893
899
|
}
|
|
894
|
-
catch (
|
|
895
|
-
dispatch(Toast.actions.error({ label:
|
|
900
|
+
catch (err) {
|
|
901
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
896
902
|
return rejectWithValue({ error: 1, errorMsg: 'Error deleting bookmark' });
|
|
897
903
|
}
|
|
898
904
|
}));
|
|
@@ -1147,7 +1153,6 @@ const initialState$h = {
|
|
|
1147
1153
|
comments: [],
|
|
1148
1154
|
};
|
|
1149
1155
|
const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1150
|
-
var _a;
|
|
1151
1156
|
try {
|
|
1152
1157
|
const res = yield extra.jApi.article.getComments(params, {
|
|
1153
1158
|
format: 'raw-list',
|
|
@@ -1156,18 +1161,17 @@ const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', (
|
|
|
1156
1161
|
return { idArticle: params.idArticle, list: res.result };
|
|
1157
1162
|
}
|
|
1158
1163
|
catch (error) {
|
|
1159
|
-
dispatch(Toast.actions.error({ label: (
|
|
1164
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
1160
1165
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve comments' });
|
|
1161
1166
|
}
|
|
1162
1167
|
}));
|
|
1163
1168
|
const deleteComment = toolkit.createAsyncThunk('commentList/deleteComment', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1164
|
-
var _b;
|
|
1165
1169
|
try {
|
|
1166
1170
|
yield extra.jApi.article.deleteComment(params.idComment);
|
|
1167
1171
|
return true;
|
|
1168
1172
|
}
|
|
1169
1173
|
catch (error) {
|
|
1170
|
-
dispatch(Toast.actions.error({ label: (
|
|
1174
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
1171
1175
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot delete comment' });
|
|
1172
1176
|
}
|
|
1173
1177
|
}));
|
|
@@ -2094,7 +2098,6 @@ const magicPadSlice = toolkit.createSlice({
|
|
|
2094
2098
|
},
|
|
2095
2099
|
});
|
|
2096
2100
|
const fetchPads = toolkit.createAsyncThunk('magicPad/fetchPads', (params, { extra, rejectWithValue, dispatch, getState }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2097
|
-
var _a;
|
|
2098
2101
|
try {
|
|
2099
2102
|
const state = getState().magicPad;
|
|
2100
2103
|
const page = state.page;
|
|
@@ -2122,7 +2125,7 @@ const fetchPads = toolkit.createAsyncThunk('magicPad/fetchPads', (params, { extr
|
|
|
2122
2125
|
})).result;
|
|
2123
2126
|
}
|
|
2124
2127
|
catch (error) {
|
|
2125
|
-
dispatch(Toast.actions.error({ label: (
|
|
2128
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2126
2129
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot fetch pads' });
|
|
2127
2130
|
}
|
|
2128
2131
|
}));
|
|
@@ -2246,7 +2249,6 @@ const mediaLibrarySlice = toolkit.createSlice({
|
|
|
2246
2249
|
},
|
|
2247
2250
|
});
|
|
2248
2251
|
const fetchMediaLibraryFolders = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFolders', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2249
|
-
var _a;
|
|
2250
2252
|
const args = {
|
|
2251
2253
|
type: MediaLibraryAppConst.typeMediaLibraryFolder,
|
|
2252
2254
|
format: 'raw-little',
|
|
@@ -2256,12 +2258,11 @@ const fetchMediaLibraryFolders = toolkit.createAsyncThunk('MediaLibrary/fetchMed
|
|
|
2256
2258
|
return yield extra.jApi.article.list(args);
|
|
2257
2259
|
}
|
|
2258
2260
|
catch (error) {
|
|
2259
|
-
dispatch(Toast.actions.error({ label: (
|
|
2261
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2260
2262
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve folders' });
|
|
2261
2263
|
}
|
|
2262
2264
|
}));
|
|
2263
2265
|
const fetchMediaLibraryUnclassifiedFiles = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryUnclassifiedFiles', (page, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2264
|
-
var _b;
|
|
2265
2266
|
try {
|
|
2266
2267
|
return yield extra.jApi.mediaLibrary.GetUnclassifiedFiles({
|
|
2267
2268
|
format: 'raw-little',
|
|
@@ -2270,47 +2271,43 @@ const fetchMediaLibraryUnclassifiedFiles = toolkit.createAsyncThunk('MediaLibrar
|
|
|
2270
2271
|
});
|
|
2271
2272
|
}
|
|
2272
2273
|
catch (error) {
|
|
2273
|
-
dispatch(Toast.actions.error({ label: (
|
|
2274
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2274
2275
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve UnclassifiedFiles' });
|
|
2275
2276
|
}
|
|
2276
2277
|
}));
|
|
2277
2278
|
const fetchMediaLibraryConfig = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryConfig', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2278
|
-
var _c;
|
|
2279
2279
|
try {
|
|
2280
2280
|
return yield extra.jApi.mediaLibrary.getAccess();
|
|
2281
2281
|
}
|
|
2282
2282
|
catch (error) {
|
|
2283
|
-
dispatch(Toast.actions.error({ label: (
|
|
2283
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2284
2284
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
|
|
2285
2285
|
}
|
|
2286
2286
|
}));
|
|
2287
2287
|
const fetchMediaLibraryFoldersStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFoldersStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2288
|
-
var _d;
|
|
2289
2288
|
try {
|
|
2290
2289
|
return yield extra.jApi.mediaLibrary.getFoldersStatsList(filters, orders, page);
|
|
2291
2290
|
}
|
|
2292
2291
|
catch (error) {
|
|
2293
|
-
dispatch(Toast.actions.error({ label: (
|
|
2292
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2294
2293
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary folders stats' });
|
|
2295
2294
|
}
|
|
2296
2295
|
}));
|
|
2297
2296
|
const fetchMediaLibraryFilesStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFilesStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2298
|
-
var _e;
|
|
2299
2297
|
try {
|
|
2300
2298
|
return yield extra.jApi.mediaLibrary.getFilesStatsList(filters, orders, page);
|
|
2301
2299
|
}
|
|
2302
2300
|
catch (error) {
|
|
2303
|
-
dispatch(Toast.actions.error({ label: (
|
|
2301
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2304
2302
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
|
|
2305
2303
|
}
|
|
2306
2304
|
}));
|
|
2307
2305
|
const fetchMediaLibraryStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2308
|
-
var _f;
|
|
2309
2306
|
try {
|
|
2310
2307
|
return yield extra.jApi.mediaLibrary.getStats();
|
|
2311
2308
|
}
|
|
2312
2309
|
catch (error) {
|
|
2313
|
-
dispatch(Toast.actions.error({ label: (
|
|
2310
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
|
|
2314
2311
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary stats' });
|
|
2315
2312
|
}
|
|
2316
2313
|
}));
|
|
@@ -5445,8 +5442,8 @@ const saveCurrentStudioApp = toolkit.createAsyncThunk('studio/saveCurrentStudioA
|
|
|
5445
5442
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Edition_Saved' }));
|
|
5446
5443
|
return;
|
|
5447
5444
|
}
|
|
5448
|
-
catch (
|
|
5449
|
-
dispatch(Toast.actions.error({ label:
|
|
5445
|
+
catch (err) {
|
|
5446
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5450
5447
|
return rejectWithValue(error);
|
|
5451
5448
|
}
|
|
5452
5449
|
}));
|
|
@@ -5465,8 +5462,8 @@ const installStudioApp = toolkit.createAsyncThunk('studio/installApp', ({ callba
|
|
|
5465
5462
|
callback();
|
|
5466
5463
|
return;
|
|
5467
5464
|
}
|
|
5468
|
-
catch (
|
|
5469
|
-
dispatch(Toast.actions.error({ label:
|
|
5465
|
+
catch (err) {
|
|
5466
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5470
5467
|
return rejectWithValue(error);
|
|
5471
5468
|
}
|
|
5472
5469
|
}));
|
|
@@ -5660,9 +5657,9 @@ const fetchStudioAppsList = toolkit.createAsyncThunk('studio/appsList', (intl, {
|
|
|
5660
5657
|
}));
|
|
5661
5658
|
return transformedApps;
|
|
5662
5659
|
}
|
|
5663
|
-
catch (
|
|
5664
|
-
console.error(
|
|
5665
|
-
dispatch(Toast.actions.error({ label:
|
|
5660
|
+
catch (err) {
|
|
5661
|
+
console.error(err);
|
|
5662
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5666
5663
|
throw rejectWithValue({ error: 1, errorMsg: 'Error retrieving applications' });
|
|
5667
5664
|
}
|
|
5668
5665
|
}));
|
|
@@ -5699,8 +5696,8 @@ const createNewStudioApp = toolkit.createAsyncThunk('studio/createApp', ({ appNa
|
|
|
5699
5696
|
callback();
|
|
5700
5697
|
return newStudioApp;
|
|
5701
5698
|
}
|
|
5702
|
-
catch (
|
|
5703
|
-
dispatch(Toast.actions.error({ label:
|
|
5699
|
+
catch (err) {
|
|
5700
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5704
5701
|
throw rejectWithValue({ error: 1, errorMsg: 'Error creating application' });
|
|
5705
5702
|
}
|
|
5706
5703
|
}));
|
|
@@ -5711,8 +5708,8 @@ const deleteStudioApp = toolkit.createAsyncThunk('studio/deleteApp', ({ idApp, s
|
|
|
5711
5708
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_StudioApp_Deleted' }));
|
|
5712
5709
|
return deleteRes;
|
|
5713
5710
|
}
|
|
5714
|
-
catch (
|
|
5715
|
-
dispatch(Toast.actions.error({ label:
|
|
5711
|
+
catch (err) {
|
|
5712
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5716
5713
|
return rejectWithValue({ error: 1, errorMsg: 'Error deleting application' });
|
|
5717
5714
|
}
|
|
5718
5715
|
}));
|
|
@@ -5722,8 +5719,8 @@ const suspendStudioApp = toolkit.createAsyncThunk('studio/suspendStudioApp', ({
|
|
|
5722
5719
|
yield jApi.application.studioSuspend(idApp);
|
|
5723
5720
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Suspended' }));
|
|
5724
5721
|
}
|
|
5725
|
-
catch (
|
|
5726
|
-
dispatch(Toast.actions.error({ label:
|
|
5722
|
+
catch (err) {
|
|
5723
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5727
5724
|
throw rejectWithValue({ error: 1, errorMsg: 'Error suspending application' });
|
|
5728
5725
|
}
|
|
5729
5726
|
}));
|
|
@@ -5733,8 +5730,8 @@ const restartStudioApp = toolkit.createAsyncThunk('studio/restartStudioApp', ({
|
|
|
5733
5730
|
yield jApi.application.studioRestart(idApp);
|
|
5734
5731
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Restarted' }));
|
|
5735
5732
|
}
|
|
5736
|
-
catch (
|
|
5737
|
-
dispatch(Toast.actions.error({ label:
|
|
5733
|
+
catch (err) {
|
|
5734
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5738
5735
|
throw rejectWithValue({ error: 1, errorMsg: 'Error restarting application' });
|
|
5739
5736
|
}
|
|
5740
5737
|
}));
|
|
@@ -5760,8 +5757,8 @@ const cloneStudioApp = toolkit.createAsyncThunk('studio/cloneStudioApp', ({ idAp
|
|
|
5760
5757
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Cloned' }));
|
|
5761
5758
|
return clonedStudioApp;
|
|
5762
5759
|
}
|
|
5763
|
-
catch (
|
|
5764
|
-
dispatch(Toast.actions.error({ label:
|
|
5760
|
+
catch (err) {
|
|
5761
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5765
5762
|
return rejectWithValue({ error: 1, errorMsg: 'Error cloning application' });
|
|
5766
5763
|
}
|
|
5767
5764
|
}));
|
|
@@ -5781,8 +5778,8 @@ const createInWorkStudioApp = toolkit.createAsyncThunk('studio/createInWorkStudi
|
|
|
5781
5778
|
dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_CreateInWork' }));
|
|
5782
5779
|
return clonedStudioApp;
|
|
5783
5780
|
}
|
|
5784
|
-
catch (
|
|
5785
|
-
dispatch(Toast.actions.error({ label:
|
|
5781
|
+
catch (err) {
|
|
5782
|
+
dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
|
|
5786
5783
|
return rejectWithValue({ error: 1, errorMsg: 'Error creating in work version for application' });
|
|
5787
5784
|
}
|
|
5788
5785
|
}));
|