jamespot-front-business 1.1.90 → 1.1.92

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/esm.js CHANGED
@@ -49,9 +49,16 @@ const isAbortError = (error) => {
49
49
  return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
50
50
  };
51
51
  const getErrorMessage = (error, defaultError) => {
52
- return error && typeof error === 'object' && 'errorMsg' in error && typeof error.errorMsg === 'string'
53
- ? error.errorMsg
54
- : defaultError !== null && defaultError !== void 0 ? defaultError : 'GLOBAL_Technical_Error';
52
+ if (!error || typeof error !== 'object') {
53
+ return defaultError !== null && defaultError !== void 0 ? defaultError : 'GLOBAL_Technical_Error';
54
+ }
55
+ if ('errorMsg' in error && typeof error.errorMsg === 'string') {
56
+ return error.errorMsg;
57
+ }
58
+ if ('message' in error && typeof error.message === 'string') {
59
+ return error.message;
60
+ }
61
+ return defaultError !== null && defaultError !== void 0 ? defaultError : 'GLOBAL_Technical_Error';
55
62
  };
56
63
 
57
64
  const toastAdapter = createEntityAdapter({
@@ -122,7 +129,7 @@ const fetchLogsNavigation = createAsyncThunk('admin/fetchLogsNavigation', (param
122
129
  }
123
130
  catch (err) {
124
131
  if (!isAbortError(err)) {
125
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
132
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
126
133
  }
127
134
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs navigation' });
128
135
  }
@@ -192,7 +199,7 @@ const fetchLogsObjects = createAsyncThunk('admin/fetchLogsObjects', (params, { e
192
199
  }
193
200
  catch (err) {
194
201
  if (!isAbortError(err)) {
195
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
202
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
196
203
  }
197
204
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Objects' });
198
205
  }
@@ -261,7 +268,7 @@ const fetchLogsSearch = createAsyncThunk('admin/fetchLogsSearch', (params, { ext
261
268
  }
262
269
  catch (err) {
263
270
  if (!isAbortError(err)) {
264
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
271
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
265
272
  }
266
273
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve admin logs Search' });
267
274
  }
@@ -361,7 +368,7 @@ const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation
361
368
  }
362
369
  catch (err) {
363
370
  if (!isAbortError(err)) {
364
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
371
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
365
372
  }
366
373
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
367
374
  }
@@ -370,8 +377,8 @@ const fetchCurrentAnimationApp = createAsyncThunk('animations/fetchCurrentAnimat
370
377
  try {
371
378
  return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
372
379
  }
373
- catch (_) {
374
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
380
+ catch (err) {
381
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
375
382
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
376
383
  }
377
384
  }));
@@ -380,8 +387,8 @@ const deleteCurrentAnimation = createAsyncThunk('animations/deleteCurrentAnimati
380
387
  yield extra.jApi.animations.DeleteAnimation();
381
388
  return;
382
389
  }
383
- catch (_) {
384
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
390
+ catch (err) {
391
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
385
392
  return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
386
393
  }
387
394
  }));
@@ -390,8 +397,8 @@ const saveCurrentAnimation = createAsyncThunk('animations/saveCurrentAnimation',
390
397
  yield extra.jApi.animations.SaveAnimationConfiguration(params);
391
398
  return;
392
399
  }
393
- catch (_) {
394
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
400
+ catch (err) {
401
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
395
402
  return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
396
403
  }
397
404
  }));
@@ -400,8 +407,8 @@ const toggleAnimationIsActive = createAsyncThunk('animations/toggleAnimationIsAc
400
407
  yield extra.jApi.animations.ToggleAnimationActive();
401
408
  return;
402
409
  }
403
- catch (_) {
404
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
410
+ catch (err) {
411
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
405
412
  return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
406
413
  }
407
414
  }));
@@ -448,8 +455,8 @@ const fetchAnimationStats = createAsyncThunk('animations/fetchAnimationStats', (
448
455
  const stats = (yield extra.jApi.animations.GetAnimationStats(name)).result.data;
449
456
  return stats;
450
457
  }
451
- catch (_) {
452
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
458
+ catch (err) {
459
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
453
460
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation stats' });
454
461
  }
455
462
  }));
@@ -480,8 +487,8 @@ const fetchAnimationStatsCurrent = createAsyncThunk('animations/fetchAnimationSt
480
487
  const stats = (yield extra.jApi.animations.GetAnimationStatsCurrent(uri)).result;
481
488
  return stats;
482
489
  }
483
- catch (_) {
484
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
490
+ catch (err) {
491
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
485
492
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation stats current' });
486
493
  }
487
494
  }));
@@ -845,13 +852,12 @@ const fetchBookmark = createAsyncThunk('bookmarkList/fetchbookmarkList', (_, { e
845
852
  try {
846
853
  return yield extra.jApi.bookmark.getFormattedList(filterSpec, 'raw-list');
847
854
  }
848
- catch (_) {
849
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
855
+ catch (err) {
856
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
850
857
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve bookmarks' });
851
858
  }
852
859
  }));
853
860
  const addBookmark = createAsyncThunk('bookmarkList/addBookmark', (bookmark, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
854
- var _a;
855
861
  try {
856
862
  if (jEnsure.isBookmarkLink(bookmark)) {
857
863
  const result = yield extra.jApi.bookmark.addFormattedLink(bookmark.targetId, bookmark.targetType, 'raw-list');
@@ -863,7 +869,7 @@ const addBookmark = createAsyncThunk('bookmarkList/addBookmark', (bookmark, { ex
863
869
  }
864
870
  }
865
871
  catch (error) {
866
- const toastLabel = (_a = error.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error';
872
+ const toastLabel = getErrorMessage(error);
867
873
  dispatch(Toast.actions.error({ label: toastLabel }));
868
874
  return rejectWithValue({ error: 1, errorMsg: 'Error saving bookmark' });
869
875
  }
@@ -873,8 +879,8 @@ const moveBookmark = createAsyncThunk('bookmarkList/moveBookmark', ({ bookmark,
873
879
  yield extra.jApi.bookmark.move(bookmark.id, bookmarkReference.id, position);
874
880
  return;
875
881
  }
876
- catch (_) {
877
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
882
+ catch (err) {
883
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
878
884
  return rejectWithValue({ error: 1, errorMsg: 'Error moving bookmark' });
879
885
  }
880
886
  }));
@@ -883,8 +889,8 @@ const deleteBookmark = createAsyncThunk('bookmarkList/deleteBookmark', (bookmark
883
889
  yield extra.jApi.bookmark.delete(bookmark.id);
884
890
  return;
885
891
  }
886
- catch (_) {
887
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
892
+ catch (err) {
893
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
888
894
  return rejectWithValue({ error: 1, errorMsg: 'Error deleting bookmark' });
889
895
  }
890
896
  }));
@@ -1139,7 +1145,6 @@ const initialState$h = {
1139
1145
  comments: [],
1140
1146
  };
1141
1147
  const fetchComments = createAsyncThunk('commentList/fetchCommentList', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1142
- var _a;
1143
1148
  try {
1144
1149
  const res = yield extra.jApi.article.getComments(params, {
1145
1150
  format: 'raw-list',
@@ -1148,18 +1153,17 @@ const fetchComments = createAsyncThunk('commentList/fetchCommentList', (params,
1148
1153
  return { idArticle: params.idArticle, list: res.result };
1149
1154
  }
1150
1155
  catch (error) {
1151
- dispatch(Toast.actions.error({ label: (_a = error.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error' }));
1156
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
1152
1157
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve comments' });
1153
1158
  }
1154
1159
  }));
1155
1160
  const deleteComment = createAsyncThunk('commentList/deleteComment', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1156
- var _b;
1157
1161
  try {
1158
1162
  yield extra.jApi.article.deleteComment(params.idComment);
1159
1163
  return true;
1160
1164
  }
1161
1165
  catch (error) {
1162
- dispatch(Toast.actions.error({ label: (_b = error.errorMsg) !== null && _b !== void 0 ? _b : 'GLOBAL_Technical_Error' }));
1166
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
1163
1167
  return rejectWithValue({ error: 1, errorMsg: 'Cannot delete comment' });
1164
1168
  }
1165
1169
  }));
@@ -2086,7 +2090,6 @@ const magicPadSlice = createSlice({
2086
2090
  },
2087
2091
  });
2088
2092
  const fetchPads = createAsyncThunk('magicPad/fetchPads', (params, { extra, rejectWithValue, dispatch, getState }) => __awaiter(void 0, void 0, void 0, function* () {
2089
- var _a;
2090
2093
  try {
2091
2094
  const state = getState().magicPad;
2092
2095
  const page = state.page;
@@ -2114,7 +2117,7 @@ const fetchPads = createAsyncThunk('magicPad/fetchPads', (params, { extra, rejec
2114
2117
  })).result;
2115
2118
  }
2116
2119
  catch (error) {
2117
- dispatch(Toast.actions.error({ label: (_a = error.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error' }));
2120
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2118
2121
  return rejectWithValue({ error: 1, errorMsg: 'Cannot fetch pads' });
2119
2122
  }
2120
2123
  }));
@@ -2238,7 +2241,6 @@ const mediaLibrarySlice = createSlice({
2238
2241
  },
2239
2242
  });
2240
2243
  const fetchMediaLibraryFolders = createAsyncThunk('MediaLibrary/fetchMediaLibraryFolders', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2241
- var _a;
2242
2244
  const args = {
2243
2245
  type: MediaLibraryAppConst.typeMediaLibraryFolder,
2244
2246
  format: 'raw-little',
@@ -2248,12 +2250,11 @@ const fetchMediaLibraryFolders = createAsyncThunk('MediaLibrary/fetchMediaLibrar
2248
2250
  return yield extra.jApi.article.list(args);
2249
2251
  }
2250
2252
  catch (error) {
2251
- dispatch(Toast.actions.error({ label: (_a = error.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error' }));
2253
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2252
2254
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve folders' });
2253
2255
  }
2254
2256
  }));
2255
2257
  const fetchMediaLibraryUnclassifiedFiles = createAsyncThunk('MediaLibrary/fetchMediaLibraryUnclassifiedFiles', (page, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2256
- var _b;
2257
2258
  try {
2258
2259
  return yield extra.jApi.mediaLibrary.GetUnclassifiedFiles({
2259
2260
  format: 'raw-little',
@@ -2262,47 +2263,43 @@ const fetchMediaLibraryUnclassifiedFiles = createAsyncThunk('MediaLibrary/fetchM
2262
2263
  });
2263
2264
  }
2264
2265
  catch (error) {
2265
- dispatch(Toast.actions.error({ label: (_b = error.errorMsg) !== null && _b !== void 0 ? _b : 'GLOBAL_Technical_Error' }));
2266
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2266
2267
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve UnclassifiedFiles' });
2267
2268
  }
2268
2269
  }));
2269
2270
  const fetchMediaLibraryConfig = createAsyncThunk('MediaLibrary/fetchMediaLibraryConfig', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2270
- var _c;
2271
2271
  try {
2272
2272
  return yield extra.jApi.mediaLibrary.getAccess();
2273
2273
  }
2274
2274
  catch (error) {
2275
- dispatch(Toast.actions.error({ label: (_c = error.errorMsg) !== null && _c !== void 0 ? _c : 'GLOBAL_Technical_Error' }));
2275
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2276
2276
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
2277
2277
  }
2278
2278
  }));
2279
2279
  const fetchMediaLibraryFoldersStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFoldersStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2280
- var _d;
2281
2280
  try {
2282
2281
  return yield extra.jApi.mediaLibrary.getFoldersStatsList(filters, orders, page);
2283
2282
  }
2284
2283
  catch (error) {
2285
- dispatch(Toast.actions.error({ label: (_d = error.errorMsg) !== null && _d !== void 0 ? _d : 'GLOBAL_Technical_Error' }));
2284
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2286
2285
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary folders stats' });
2287
2286
  }
2288
2287
  }));
2289
2288
  const fetchMediaLibraryFilesStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFilesStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2290
- var _e;
2291
2289
  try {
2292
2290
  return yield extra.jApi.mediaLibrary.getFilesStatsList(filters, orders, page);
2293
2291
  }
2294
2292
  catch (error) {
2295
- dispatch(Toast.actions.error({ label: (_e = error.errorMsg) !== null && _e !== void 0 ? _e : 'GLOBAL_Technical_Error' }));
2293
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2296
2294
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
2297
2295
  }
2298
2296
  }));
2299
2297
  const fetchMediaLibraryStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
2300
- var _f;
2301
2298
  try {
2302
2299
  return yield extra.jApi.mediaLibrary.getStats();
2303
2300
  }
2304
2301
  catch (error) {
2305
- dispatch(Toast.actions.error({ label: (_f = error.errorMsg) !== null && _f !== void 0 ? _f : 'GLOBAL_Technical_Error' }));
2302
+ dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
2306
2303
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary stats' });
2307
2304
  }
2308
2305
  }));
@@ -4421,7 +4418,9 @@ function renderWidget(fieldType, fieldProperties) {
4421
4418
  </options>
4422
4419
  ${hasDefaultValue || userCanModifyByComment
4423
4420
  ? `<params>
4424
- ${hasDefaultValue ? `<param key="defaultValue" value="${optionEditor.value.defaultSelectOptionValue.value}"/>` : ''}
4421
+ ${hasDefaultValue
4422
+ ? `<param key="defaultValue" value="${optionEditor.value.defaultSelectOptionValue.value}"/>`
4423
+ : ''}
4425
4424
  ${userCanModifyByComment ? `<param key="explain" value="1"/>` : ''}
4426
4425
  </params>`
4427
4426
  : ''}
@@ -4512,7 +4511,7 @@ function renderWidget(fieldType, fieldProperties) {
4512
4511
  function renderProperty(properties, propertyToFind) {
4513
4512
  const labelProperty = properties === null || properties === void 0 ? void 0 : properties.find((property) => property.propertyType === propertyToFind);
4514
4513
  if (labelProperty) {
4515
- const value = labelProperty.value.replaceAll("\"", "&quot;");
4514
+ const value = labelProperty.value.replaceAll('"', '&quot;');
4516
4515
  return `${propertyToFind.toLowerCase()}="${value}"`;
4517
4516
  }
4518
4517
  return '';
@@ -4618,7 +4617,7 @@ function renderDisplays(studioApp) {
4618
4617
  const viewField = Object.entries(viewContent)
4619
4618
  .filter((a) => a[1].isUsed)
4620
4619
  .sort((a, b) => a[1].pos - b[1].pos);
4621
- toRet += `<display view="${internal2XmlView[viewName]}" mode="${viewName === 'view' ? 'view' : 'form'}">
4620
+ toRet += `<display view="${internal2XmlView[viewName]}${viewName === 'view' && studioApp.manifest.displayContentLegacyTable ? 'Disabled' : ''}" mode="${viewName === 'view' ? 'view' : 'form'}">
4622
4621
  ${viewField.map(([fieldId, view]) => renderDisplayAttr(fieldId, view)).join('')}
4623
4622
  </display>`;
4624
4623
  }
@@ -4760,6 +4759,7 @@ const installedToV2ViewNames = {
4760
4759
  create: 'create',
4761
4760
  edit: 'edit',
4762
4761
  display: 'view',
4762
+ displayDisabled: 'view',
4763
4763
  };
4764
4764
  const specialAttrName = ['title', 'alertAuthor', 'sendAlert'];
4765
4765
  const ignoredFields = ['edito'];
@@ -5301,12 +5301,13 @@ function getDateCreationToView(isUsed = true) {
5301
5301
  }
5302
5302
 
5303
5303
  function InstalledAppStudioAdapter(serverApp, serverApps, state) {
5304
- var _a, _b, _c, _d;
5304
+ var _a, _b, _c, _d, _e, _f;
5305
5305
  const { version, dateCreation } = serverApp.manifest;
5306
5306
  const appTypeServer = serverApp.typeModel;
5307
5307
  const views = Object.assign({}, ...viewsList.map((view) => ({
5308
5308
  [view]: {},
5309
5309
  })));
5310
+ const typedApp = serverApp;
5310
5311
  const studioApp = {
5311
5312
  idApp: serverApp.idApp,
5312
5313
  status: _formatStatus(serverApp),
@@ -5326,6 +5327,7 @@ function InstalledAppStudioAdapter(serverApp, serverApps, state) {
5326
5327
  viewSolr: serverApp.view ? STUDIO_VIEW.SOLR : STUDIO_VIEW.NOT_SOLR,
5327
5328
  typeLabel: appTypeServer.typeLabel,
5328
5329
  articlesCount: (_d = serverApp.articlesCount) !== null && _d !== void 0 ? _d : 0,
5330
+ displayContentLegacyTable: !!((_f = (_e = typedApp === null || typedApp === void 0 ? void 0 : typedApp.typeModel) === null || _e === void 0 ? void 0 : _e.displays) === null || _f === void 0 ? void 0 : _f['displayDisabled']),
5329
5331
  },
5330
5332
  fields: [],
5331
5333
  views,
@@ -5437,8 +5439,8 @@ const saveCurrentStudioApp = createAsyncThunk('studio/saveCurrentStudioApp', (_,
5437
5439
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Edition_Saved' }));
5438
5440
  return;
5439
5441
  }
5440
- catch (_) {
5441
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5442
+ catch (err) {
5443
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5442
5444
  return rejectWithValue(error);
5443
5445
  }
5444
5446
  }));
@@ -5457,8 +5459,8 @@ const installStudioApp = createAsyncThunk('studio/installApp', ({ callback }, {
5457
5459
  callback();
5458
5460
  return;
5459
5461
  }
5460
- catch (_) {
5461
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5462
+ catch (err) {
5463
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5462
5464
  return rejectWithValue(error);
5463
5465
  }
5464
5466
  }));
@@ -5652,9 +5654,9 @@ const fetchStudioAppsList = createAsyncThunk('studio/appsList', (intl, { extra,
5652
5654
  }));
5653
5655
  return transformedApps;
5654
5656
  }
5655
- catch (_) {
5656
- console.error(_);
5657
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5657
+ catch (err) {
5658
+ console.error(err);
5659
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5658
5660
  throw rejectWithValue({ error: 1, errorMsg: 'Error retrieving applications' });
5659
5661
  }
5660
5662
  }));
@@ -5691,8 +5693,8 @@ const createNewStudioApp = createAsyncThunk('studio/createApp', ({ appName, call
5691
5693
  callback();
5692
5694
  return newStudioApp;
5693
5695
  }
5694
- catch (_) {
5695
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5696
+ catch (err) {
5697
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5696
5698
  throw rejectWithValue({ error: 1, errorMsg: 'Error creating application' });
5697
5699
  }
5698
5700
  }));
@@ -5703,8 +5705,8 @@ const deleteStudioApp = createAsyncThunk('studio/deleteApp', ({ idApp, status },
5703
5705
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_StudioApp_Deleted' }));
5704
5706
  return deleteRes;
5705
5707
  }
5706
- catch (_) {
5707
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5708
+ catch (err) {
5709
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5708
5710
  return rejectWithValue({ error: 1, errorMsg: 'Error deleting application' });
5709
5711
  }
5710
5712
  }));
@@ -5714,8 +5716,8 @@ const suspendStudioApp = createAsyncThunk('studio/suspendStudioApp', ({ idApp },
5714
5716
  yield jApi.application.studioSuspend(idApp);
5715
5717
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Suspended' }));
5716
5718
  }
5717
- catch (_) {
5718
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5719
+ catch (err) {
5720
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5719
5721
  throw rejectWithValue({ error: 1, errorMsg: 'Error suspending application' });
5720
5722
  }
5721
5723
  }));
@@ -5725,8 +5727,8 @@ const restartStudioApp = createAsyncThunk('studio/restartStudioApp', ({ idApp },
5725
5727
  yield jApi.application.studioRestart(idApp);
5726
5728
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Restarted' }));
5727
5729
  }
5728
- catch (_) {
5729
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5730
+ catch (err) {
5731
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5730
5732
  throw rejectWithValue({ error: 1, errorMsg: 'Error restarting application' });
5731
5733
  }
5732
5734
  }));
@@ -5752,8 +5754,8 @@ const cloneStudioApp = createAsyncThunk('studio/cloneStudioApp', ({ idApp, inWor
5752
5754
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_Cloned' }));
5753
5755
  return clonedStudioApp;
5754
5756
  }
5755
- catch (_) {
5756
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5757
+ catch (err) {
5758
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5757
5759
  return rejectWithValue({ error: 1, errorMsg: 'Error cloning application' });
5758
5760
  }
5759
5761
  }));
@@ -5773,8 +5775,8 @@ const createInWorkStudioApp = createAsyncThunk('studio/createInWorkStudioApp', (
5773
5775
  dispatch(Toast.actions.success({ label: 'APPSTUDIO_AppItem_CreateInWork' }));
5774
5776
  return clonedStudioApp;
5775
5777
  }
5776
- catch (_) {
5777
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
5778
+ catch (err) {
5779
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
5778
5780
  return rejectWithValue({ error: 1, errorMsg: 'Error creating in work version for application' });
5779
5781
  }
5780
5782
  }));