@sapui5/sap.ushell_abap 1.140.0 → 1.141.1

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.
Files changed (41) hide show
  1. package/package.json +2 -2
  2. package/src/main/js/sap/ushell_abap/.library +1 -1
  3. package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +12 -9
  4. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +9 -9
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +39 -36
  6. package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
  7. package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
  8. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +8 -10
  9. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +150 -91
  10. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +18 -15
  15. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +3 -3
  16. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
  17. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +2 -2
  19. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  20. package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +28 -20
  21. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  22. package/src/main/js/sap/ushell_abap/bootstrap/evo/SAPCompanionConditionSetter.js +1 -1
  23. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
  24. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +1 -1
  25. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +17 -13
  26. package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +58 -56
  27. package/src/main/js/sap/ushell_abap/components/TCodeNavigation/MessageCode.js +47 -0
  28. package/src/main/js/sap/ushell_abap/components/TCodeNavigation/TCodeNavigationError.js +59 -0
  29. package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +129 -116
  30. package/src/main/js/sap/ushell_abap/integration/fileshares/AppRuntimeFileShareSupport.js +4 -4
  31. package/src/main/js/sap/ushell_abap/library.js +8 -1
  32. package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +11 -11
  33. package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +2 -2
  34. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +4 -8
  35. package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +4 -8
  36. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +18 -6
  37. package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +6 -9
  38. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +2 -2
  39. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +2 -2
  40. package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +2 -2
  41. package/ui5.yaml +33 -1
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileoverview The Unified Shell's page building adapter for the ABAP platform. Private copy. Classical home page functions are deprecated.
5
5
  * @since 1.121
6
- * @version 1.140.0
6
+ * @version 1.141.1
7
7
  */
8
8
  sap.ui.define([
9
9
  "sap/ui/thirdparty/URI",
@@ -22,7 +22,8 @@ sap.ui.define([
22
22
  "sap/ushell/ui/tile/StaticTile",
23
23
  "sap/ushell/utils",
24
24
  "sap/ushell_abap/pbServices/ui2/contracts/preview",
25
- "sap/ushell/Container"
25
+ "sap/ushell/Container",
26
+ "sap/ushell/utils/LaunchpadError"
26
27
  ], (
27
28
  URI,
28
29
  ManifestPropertyHelper,
@@ -40,7 +41,8 @@ sap.ui.define([
40
41
  StaticTile,
41
42
  ushellUtils,
42
43
  Preview,
43
- Container
44
+ Container,
45
+ LaunchpadError
44
46
  ) => {
45
47
  "use strict";
46
48
 
@@ -110,14 +112,14 @@ sap.ui.define([
110
112
  function getImplementationAsSapui5 (oTile, sTitle, sMessage) {
111
113
  try {
112
114
  return oTile.getImplementationAsSapui5();
113
- } catch (ex) {
115
+ } catch (oError) {
114
116
  // log errors, but do not fail
115
- Log.error(`${sMessage}: ${ex.message || ex}`, ex.stack, sCOMPONENT);
117
+ Log.error(sMessage, oError, sCOMPONENT);
116
118
  return new StaticTile({
117
119
  icon: "sap-icon://error",
118
120
  info: "",
119
121
  infoState: "Critical",
120
- subtitle: ex.message || ex,
122
+ subtitle: oError.message || oError,
121
123
  title: sTitle
122
124
  }).addStyleClass("sapUshellTileError");
123
125
  }
@@ -167,7 +169,7 @@ sap.ui.define([
167
169
  try {
168
170
  sTileConfig = oChip.getConfigurationParameter(sConfigParameterId);
169
171
  oTileConfig = JSON.parse(sTileConfig);
170
- } catch (e) {
172
+ } catch {
171
173
  // most likely this is not a static or dynamic applauncher
172
174
  return undefined;
173
175
  }
@@ -345,7 +347,7 @@ sap.ui.define([
345
347
  try {
346
348
  oConfiguration = JSON.parse(that._oCurrentPageSet.getConfiguration());
347
349
  oConfiguration.order.splice(0, 0, that._oCurrentPageSet.getDefaultPage().getId());
348
- } catch (e) {
350
+ } catch {
349
351
  oConfiguration = { order: [that._oCurrentPageSet.getDefaultPage().getId()] };
350
352
  }
351
353
  return LaunchPageAdapter.prototype._orderBasedOnConfiguration(oConfiguration, that._oCurrentPageSet.getPages());
@@ -366,15 +368,19 @@ sap.ui.define([
366
368
  const oDeferred = new jQuery.Deferred();
367
369
 
368
370
  if (!aHiddenGroupsIDs || !(aHiddenGroupsIDs instanceof Array)) {
369
- oDeferred.reject("Input parameter must be of type Array.");
371
+ oDeferred.reject(new Error("Input parameter must be of type Array."));
370
372
  } else {
371
373
  const oConf = JSON.parse(that._oCurrentPageSet.getConfiguration() || "{}");
372
374
 
373
375
  // Replace the hidden groups array on the current configuration with the new hidden groups array
374
376
  oConf.hiddenGroups = aHiddenGroupsIDs;
375
- that._oCurrentPageSet.setConfiguration(JSON.stringify(oConf),
376
- /* fnSuccess */oDeferred.resolve.bind(oDeferred),
377
- /* fnFailure */oDeferred.reject.bind(oDeferred));
377
+ that._oCurrentPageSet.setConfiguration(
378
+ JSON.stringify(oConf),
379
+ /* fnSuccess */oDeferred.resolve.bind(oDeferred),
380
+ /* fnFailure */(sErrorMessage) => {
381
+ oDeferred.reject(new Error(sErrorMessage));
382
+ }
383
+ );
378
384
  }
379
385
  return oDeferred.promise();
380
386
  };
@@ -428,11 +434,11 @@ sap.ui.define([
428
434
  delete oChipInstance.$loadingPromise; // was temporarily needed only
429
435
  }
430
436
 
431
- function fnFailure (sMessage) {
437
+ function fnFailure (sErrorMessage) {
432
438
  // log errors, but do not fail
433
- Log.error(`Failed to load tile: ${sMessage}`, oChipInstance.toString(), sCOMPONENT);
439
+ Log.error(`Failed to load tile '${oChipInstance.toString()}': ${sErrorMessage}`, null, sCOMPONENT);
434
440
  if (oChipInstance._loadingDeferred) {
435
- oChipInstance._loadingDeferred.reject();
441
+ oChipInstance._loadingDeferred.reject(new Error(sErrorMessage));
436
442
  }
437
443
  delete oChipInstance._loadingDeferred;
438
444
  delete oChipInstance.$loadingPromise; // was temporarily needed only
@@ -625,12 +631,14 @@ sap.ui.define([
625
631
  }
626
632
 
627
633
  if (ObjectPath.get("compactTMPromise", oAdapterConfig)) {
628
- oAdapterConfig.compactTMPromise.then((oResult) => {
629
- const aRes = formatResult(oResult || {});
630
- oDeferred.resolve({ results: aRes });
631
- }, (sFail) => {
632
- oDeferred.reject(sFail);
633
- });
634
+ oAdapterConfig.compactTMPromise
635
+ .then((oResult) => {
636
+ const aRes = formatResult(oResult || {});
637
+ oDeferred.resolve({ results: aRes });
638
+ })
639
+ .catch((oError) => {
640
+ oDeferred.reject(oError);
641
+ });
634
642
  return oDeferred.promise();
635
643
  }
636
644
  const oTargetMappingsConfig = ObjectPath.create("services.targetMappings", oAdapterConfig);
@@ -654,8 +662,8 @@ sap.ui.define([
654
662
  const aRes = formatResult(oDirectStartTargetMappings);
655
663
  oDeferred.resolve({ results: aRes });
656
664
  },
657
- (sMessage) => {
658
- oDeferred.reject(sMessage);
665
+ (sErrorMessage) => {
666
+ oDeferred.reject(new Error(sErrorMessage));
659
667
  }
660
668
  );
661
669
  return oDeferred.promise();
@@ -760,11 +768,11 @@ sap.ui.define([
760
768
  const sConfigParam = oChipInstance.getConfigurationParameter("tileConfiguration");
761
769
  try {
762
770
  oParsedTileConfiguration = JSON.parse(sConfigParam || "{}");
763
- } catch (oEx) {
771
+ } catch (oError) {
764
772
  Log.error(`Tile with ID '${oChipInstance.getId()
765
773
  }' has a corrupt configuration containing a 'tileConfiguration' value '${sConfigParam
766
774
  }' which could not be parsed. If present, a (stringified) JSON is expected as value.`,
767
- oEx.message,
775
+ oError,
768
776
  "sap.ushell_abap.adapters.abap.LaunchPageAdapter"
769
777
  );
770
778
  return {}; // the FLP must react robust on broken single tiles
@@ -799,7 +807,7 @@ sap.ui.define([
799
807
  oAppLauncherStyleConfig.navigation_semantic_object = oParsedTileProperties.semanticObject;
800
808
  oAppLauncherStyleConfig.navigation_semantic_action = oParsedTileProperties.semanticAction;
801
809
  }
802
- } catch (oEx) {
810
+ } catch (oError) {
803
811
  // it is fine if a tile is not sticking to the expected configuration structure
804
812
  return {};
805
813
  }
@@ -851,7 +859,7 @@ sap.ui.define([
851
859
  // Drawback: Configuration defaults (which are usually not used in Fiori) from CHIP definition XML are ignored here.
852
860
  const oConfigParam = JSON.parse(oChipInstance.getChip()._getChipRawConfigurationString());
853
861
  oParsedTileConfiguration = JSON.parse(oConfigParam && oConfigParam.tileConfiguration || "{}");
854
- } catch (oEx) {
862
+ } catch (oError) {
855
863
  // Custom tiles may or may not stick to the app launcher's configuration format
856
864
  return {};
857
865
  }
@@ -1444,8 +1452,8 @@ sap.ui.define([
1444
1452
 
1445
1453
  try {
1446
1454
  oLayout = JSON.parse(oGroup.getLayout());
1447
- } catch (e) {
1448
- Log.warning(`Group ${oGroup.getId()}: invalid layout: ${oGroup.getLayout()}`, null, sCOMPONENT);
1455
+ } catch (oError) {
1456
+ Log.warning(`Group ${oGroup.getId()}: invalid layout: ${oGroup.getLayout()}`, oError, sCOMPONENT);
1449
1457
  // no valid layout
1450
1458
  }
1451
1459
  return this._orderBasedOnConfiguration(oLayout, oGroup.getChipInstances());
@@ -1496,7 +1504,9 @@ sap.ui.define([
1496
1504
 
1497
1505
  that._oCurrentPageSet.appendPage(sTitle, sDEFAULT_CATALOG_ID,
1498
1506
  oDeferred.resolve.bind(oDeferred),
1499
- oDeferred.reject.bind(oDeferred, getOrderedPages()));
1507
+ (sErrorMessage) => {
1508
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1509
+ });
1500
1510
 
1501
1511
  return oDeferred.promise();
1502
1512
  };
@@ -1515,10 +1525,16 @@ sap.ui.define([
1515
1525
  const oDeferred = new jQuery.Deferred();
1516
1526
 
1517
1527
  if (that._oCurrentPageSet.isPageRemovable(oGroup)) {
1518
- that._oCurrentPageSet.removePage(oGroup, oDeferred.resolve.bind(oDeferred),
1519
- oDeferred.reject.bind(oDeferred, getOrderedPages()));
1528
+ that._oCurrentPageSet.removePage(
1529
+ oGroup,
1530
+ oDeferred.resolve.bind(oDeferred),
1531
+ (sErrorMessage) => {
1532
+ Log.error(`Failed to remove group '${oGroup.toString()}'`, sErrorMessage, sCOMPONENT);
1533
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1534
+ }
1535
+ );
1520
1536
  } else {
1521
- oDeferred.reject(getOrderedPages());
1537
+ oDeferred.reject(new Error("Group is not removable"), getOrderedPages());
1522
1538
  }
1523
1539
  return oDeferred.promise();
1524
1540
  };
@@ -1540,12 +1556,17 @@ sap.ui.define([
1540
1556
 
1541
1557
  if (that._oCurrentPageSet.isPageRemovable(oGroup)) {
1542
1558
  // pages which are removable should be removed and cannot be reset
1543
- oDeferred.reject(getOrderedPages());
1559
+ oDeferred.reject(new Error("Group is not removable"), getOrderedPages());
1544
1560
  } else if (that._oCurrentPageSet.isPageResettable(oGroup)) {
1545
1561
  // pages which are resettable should be reset
1546
- that._oCurrentPageSet.resetPage(oGroup, () => {
1547
- that._loadApplaunchersAndDelayLoadingOfOtherChips([oGroup], oDeferred.resolve.bind(oDeferred, oGroup));
1548
- }, oDeferred.reject.bind(oDeferred, getOrderedPages()));
1562
+ that._oCurrentPageSet.resetPage(
1563
+ oGroup,
1564
+ () => {
1565
+ that._loadApplaunchersAndDelayLoadingOfOtherChips([oGroup], oDeferred.resolve.bind(oDeferred, oGroup));
1566
+ },
1567
+ (sErrorMessage) => {
1568
+ oDeferred.reject(new Error("Failed to reset group"), getOrderedPages());
1569
+ });
1549
1570
  } else {
1550
1571
  // on all other pages an reset has simply no effect
1551
1572
  oDeferred.resolve(oGroup);
@@ -1809,7 +1830,9 @@ sap.ui.define([
1809
1830
  oConf.order = aIds;
1810
1831
  that._oCurrentPageSet.setConfiguration(JSON.stringify(oConf),
1811
1832
  oDeferred.resolve.bind(oDeferred),
1812
- oDeferred.reject.bind(oDeferred, getOrderedPages()));
1833
+ (sErrorMessage) => {
1834
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1835
+ });
1813
1836
  }
1814
1837
 
1815
1838
  this.getGroups().done((aPages) => {
@@ -1838,8 +1861,8 @@ sap.ui.define([
1838
1861
 
1839
1862
  oGroup.setTitle(sNewTitle,
1840
1863
  oDeferred.resolve.bind(oDeferred),
1841
- () => {
1842
- oDeferred.reject(oGroup.getTitle());
1864
+ (sErrorMessage) => {
1865
+ oDeferred.reject(new Error("Failed to set group title"), oGroup.getTitle());
1843
1866
  });
1844
1867
 
1845
1868
  return oDeferred.promise();
@@ -1862,7 +1885,7 @@ sap.ui.define([
1862
1885
  if (oCatalogTile.isStub()) {
1863
1886
  // this is a "Cannot load tile" tile, this should not be added to the group
1864
1887
  // BCP 1670300106
1865
- oDeferred.reject(getOrderedPages(), new Error("Tile was not added to the group as the tile failed loading"));
1888
+ oDeferred.reject(new Error("Tile was not added to the group as the tile failed loading"), getOrderedPages());
1866
1889
  } else {
1867
1890
  if (!oGroup) {
1868
1891
  oGroup = that._oCurrentPageSet.getDefaultPage();
@@ -1870,7 +1893,10 @@ sap.ui.define([
1870
1893
 
1871
1894
  oGroup.addChipInstance(oChip,
1872
1895
  oDeferred.resolve.bind(oDeferred),
1873
- oDeferred.reject.bind(oDeferred, getOrderedPages()));
1896
+ (sErrorMessage) => {
1897
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1898
+ }
1899
+ );
1874
1900
  }
1875
1901
 
1876
1902
  return oDeferred.promise();
@@ -1891,7 +1917,10 @@ sap.ui.define([
1891
1917
 
1892
1918
  oGroup.removeChipInstance(oTile,
1893
1919
  oDeferred.resolve.bind(oDeferred),
1894
- oDeferred.reject.bind(oDeferred, getOrderedPages()));
1920
+ (sErrorMessage) => {
1921
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1922
+ }
1923
+ );
1895
1924
  return oDeferred.promise();
1896
1925
  };
1897
1926
 
@@ -1915,7 +1944,9 @@ sap.ui.define([
1915
1944
  const bIsWrapperOnly = this._isWrapperOnly(oTile);
1916
1945
  const oBagsContents = new Utils.Map();
1917
1946
  let oCreatedChipInstance;
1918
- const fnFailure = oDeferred.reject.bind(oDeferred, getOrderedPages());
1947
+ function fnFailure (sErrorMessage) {
1948
+ oDeferred.reject(new Error(sErrorMessage), getOrderedPages());
1949
+ }
1919
1950
  let iCalls = 2;
1920
1951
 
1921
1952
  function resolveMoveBetweenGroups (oNewChipInstance) {
@@ -1940,7 +1971,7 @@ sap.ui.define([
1940
1971
  iSourceIndex = removeFromLayout(oSourceLayout, oTile, sOldTileType);
1941
1972
  if (iSourceIndex < 0) {
1942
1973
  Log.error("moveTile: tile not found in source group", null, sCOMPONENT);
1943
- fnFailure();
1974
+ fnFailure("moveTile: tile not found in source group");
1944
1975
  return oDeferred.promise();
1945
1976
  }
1946
1977
 
@@ -2047,8 +2078,8 @@ sap.ui.define([
2047
2078
  // Note: no verification if oTile.getChip().getAvailableTypes() contains "link" -> fail early in this case
2048
2079
  return "link";
2049
2080
  }
2050
- } catch (e) {
2051
- Log.warning(`Group ${oGroup.getId()}: invalid layout: ${oGroup.getLayout()}`, null, sCOMPONENT);
2081
+ } catch (oError) {
2082
+ Log.warning(`Group ${oGroup.getId()}: invalid layout: ${oGroup.getLayout()}`, oError, sCOMPONENT);
2052
2083
  }
2053
2084
 
2054
2085
  // Cards can never be a stub at this point
@@ -2078,8 +2109,8 @@ sap.ui.define([
2078
2109
  oManifest = ManifestPropertyHelper.mergeCardData(oManifest, oCardData);
2079
2110
 
2080
2111
  return oManifest;
2081
- } catch (error) {
2082
- Log.error(`Manifest of card with id '${card.getId()}' could not be read. ${error.message}`);
2112
+ } catch (oError) {
2113
+ Log.error(`Manifest of card with id '${card.getId()}' could not be read.`, oError);
2083
2114
  }
2084
2115
  };
2085
2116
 
@@ -2109,8 +2140,9 @@ sap.ui.define([
2109
2140
  const that = this;
2110
2141
  const oDeferred = new jQuery.Deferred();
2111
2142
 
2112
- function doReject (sMessage) {
2113
- oDeferred.reject(`Tile not successfully loaded${sMessage ? (`: ${sMessage}`) : ""}`);
2143
+ function doReject (oError) {
2144
+ Log.error("Tile not successfully loaded:", oError, sCOMPONENT);
2145
+ oDeferred.reject(oError);
2114
2146
  }
2115
2147
 
2116
2148
  function doResolve () {
@@ -2163,7 +2195,7 @@ sap.ui.define([
2163
2195
  // Although they are called sync the view creation is still async
2164
2196
  Utils.callHandler(doResolve, doReject, /* async */!isAppLauncher(oTile));
2165
2197
  } else { // failed
2166
- doReject();
2198
+ doReject(new Error("Tile failed to load - tile is still a stub"));
2167
2199
  }
2168
2200
  } else { // loading pending
2169
2201
  oTile.$loadingPromise
@@ -2171,8 +2203,8 @@ sap.ui.define([
2171
2203
  .done(() => {
2172
2204
  try {
2173
2205
  doResolve();
2174
- } catch (ex) {
2175
- doReject((ex.message || ex));
2206
+ } catch (oError) {
2207
+ doReject((oError));
2176
2208
  }
2177
2209
  });
2178
2210
  }
@@ -2400,10 +2432,10 @@ sap.ui.define([
2400
2432
  if (iPendingRequests <= 0) {
2401
2433
  oDeferred.resolve(aWrappedCatalogs);
2402
2434
  }
2403
- }, (sMessage) => {
2435
+ }, (sErrorMessage) => {
2404
2436
  // log errors, but do not fail
2405
- Log.error(`Failed to load catalog: ${sMessage}`, oCatalog.toString(), sCOMPONENT);
2406
- oWrappedCatalog.errorMessage = sMessage || "Error"; // not undefined!
2437
+ Log.error(`Failed to load catalog: ${sErrorMessage}`, oCatalog.toString(), sCOMPONENT);
2438
+ oWrappedCatalog.errorMessage = sErrorMessage || "Error"; // not undefined!
2407
2439
 
2408
2440
  oDeferred.notify(oWrappedCatalog);
2409
2441
 
@@ -2456,7 +2488,9 @@ sap.ui.define([
2456
2488
  if (oAllCatalogs.isStub()) {
2457
2489
  oAllCatalogs.load(() => {
2458
2490
  this._refreshRemoteCatalogs(oDeferred);
2459
- }, oDeferred.reject, "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", true, "title", true);
2491
+ }, (sErrorMessage) => {
2492
+ oDeferred.reject(new Error(sErrorMessage));
2493
+ }, "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", true, "title", true);
2460
2494
  } else if (bRefreshRequired) {
2461
2495
  this._refreshRemoteCatalogs(oDeferred);
2462
2496
  } else {
@@ -2594,9 +2628,9 @@ sap.ui.define([
2594
2628
  }
2595
2629
  }
2596
2630
 
2597
- function onFailure (oCatalogTile, sMessage) {
2631
+ function onFailure (oCatalogTile, sErrorMessage) {
2598
2632
  // log errors, but do not fail
2599
- Log.error(`Failed to load catalog tile: ${sMessage}`, oCatalogTile.toString(), sCOMPONENT);
2633
+ Log.error(`Failed to load catalog tile: ${sErrorMessage}`, oCatalogTile.toString(), sCOMPONENT);
2600
2634
  onLoaded();
2601
2635
  }
2602
2636
 
@@ -3034,7 +3068,7 @@ sap.ui.define([
3034
3068
  if (oGroup && !(oGroup instanceof Page)) {
3035
3069
  // same behavior like addCatalogTileToGroup of the Bookmark service:
3036
3070
  // if the group is unknown don't use the default group but reject.
3037
- oDeferred.reject("The given object is not a group");
3071
+ oDeferred.reject(new Error("The given object is not a group"));
3038
3072
  return oDeferred.promise();
3039
3073
  }
3040
3074
 
@@ -3046,8 +3080,8 @@ sap.ui.define([
3046
3080
  .then(() => {
3047
3081
  oDeferred.resolve();
3048
3082
  })
3049
- .catch((vError) => {
3050
- oDeferred.reject(vError.toString());
3083
+ .catch((oError) => {
3084
+ oDeferred.reject(oError);
3051
3085
  });
3052
3086
  return oDeferred.promise();
3053
3087
  };
@@ -3096,7 +3130,7 @@ sap.ui.define([
3096
3130
  if (oGroup && !(oGroup instanceof Page)) {
3097
3131
  // same behavior like addCatalogTileToGroup of the Bookmark service:
3098
3132
  // if the group is unknown don't use the default group but reject.
3099
- oDeferred.reject("The given object is not a group");
3133
+ oDeferred.reject(new Error("The given object is not a group"));
3100
3134
  return oDeferred.promise();
3101
3135
  }
3102
3136
 
@@ -3104,8 +3138,8 @@ sap.ui.define([
3104
3138
  .then(() => {
3105
3139
  oDeferred.resolve();
3106
3140
  })
3107
- .catch((vError) => {
3108
- oDeferred.reject(vError.toString());
3141
+ .catch((oError) => {
3142
+ oDeferred.reject(oError);
3109
3143
  });
3110
3144
  return oDeferred.promise();
3111
3145
  };
@@ -3186,7 +3220,15 @@ sap.ui.define([
3186
3220
  aPromises.push(new Promise((resolve, reject) => {
3187
3221
  if (bBagUpdated) {
3188
3222
  aUpdatedBags.push(sBagId);
3189
- oBag.save(resolve, reject);
3223
+ oBag.save(resolve, (mErrorMessages, mErrorInfo) => {
3224
+ const sFirstFailedBag = Object.keys(mErrorMessages)[0];
3225
+
3226
+ reject(new LaunchpadError(`Bag save failed: ${mErrorMessages[sFirstFailedBag]}`, {
3227
+ info: mErrorInfo[sFirstFailedBag],
3228
+ otherMessages: mErrorMessages,
3229
+ otherInfo: mErrorInfo
3230
+ }));
3231
+ });
3190
3232
  } else {
3191
3233
  resolve();
3192
3234
  }
@@ -3225,9 +3267,9 @@ sap.ui.define([
3225
3267
  this.getTileSize(oChipInstance);
3226
3268
  resolve();
3227
3269
  } catch (oError) {
3228
- const sMessage = `Chip configuration check failed: ${oError.toString()}`;
3229
- Log.error(sMessage, oChipInstance.getId(), sCOMPONENT);
3230
- reject(sMessage);
3270
+ const sMessage = `Chip configuration check failed for '${oChipInstance.getId()}':`;
3271
+ Log.error(sMessage, oError, sCOMPONENT);
3272
+ reject(oError);
3231
3273
  }
3232
3274
  });
3233
3275
  };
@@ -3281,7 +3323,9 @@ sap.ui.define([
3281
3323
  // the create service does not support deep insert
3282
3324
  // Chip ChipBags -> Chip
3283
3325
  });
3284
- oGroup.addChipInstance(oChipInstance, resolve, reject, undefined);
3326
+ oGroup.addChipInstance(oChipInstance, resolve, (sErrorMessage) => {
3327
+ reject(new Error(sErrorMessage));
3328
+ }, undefined);
3285
3329
  } else {
3286
3330
  // This can happen in the app cold-start use case, when the app creates a bookmark
3287
3331
  // createPageChipInstanceFromRawData might throw Errors
@@ -3292,10 +3336,14 @@ sap.ui.define([
3292
3336
  pageId: "/UI2/Fiori2LaunchpadHome", // Default Page
3293
3337
  title: sTitle // the title is used for e.g. the message toast after deleting a bookmark
3294
3338
  }, (oRawChipInstance) => {
3295
- oFactory.createChipInstance(oRawChipInstance, resolve, reject, /* oPage */undefined);
3296
- }, reject);
3297
- } catch (vError) {
3298
- reject(vError);
3339
+ oFactory.createChipInstance(oRawChipInstance, resolve, (sErrorMessage) => {
3340
+ reject(new Error(sErrorMessage));
3341
+ }, /* oPage */undefined);
3342
+ }, (sErrorMessage) => {
3343
+ reject(new Error(sErrorMessage));
3344
+ });
3345
+ } catch (oError) {
3346
+ reject(oError);
3299
3347
  }
3300
3348
  }
3301
3349
  });
@@ -3305,9 +3353,9 @@ sap.ui.define([
3305
3353
  .then(() => {
3306
3354
  return this._checkBookmarkConfiguration(oChipInstance);
3307
3355
  })
3308
- .catch((vError) => {
3356
+ .catch((oError) => {
3309
3357
  return new Promise((resolve, reject) => {
3310
- oChipInstance.remove(reject.bind(undefined, vError), reject.bind(undefined, vError));
3358
+ oChipInstance.remove(reject.bind(undefined, oError), reject.bind(undefined, oError));
3311
3359
  });
3312
3360
  });
3313
3361
  });
@@ -3373,16 +3421,16 @@ sap.ui.define([
3373
3421
  oDeferred.resolve(iCount);
3374
3422
  } else {
3375
3423
  jQuery.when.apply(jQuery, aDeferreds)
3376
- .fail((sMessage) => {
3377
- oDeferred.reject(sMessage);
3424
+ .fail((oError) => {
3425
+ oDeferred.reject(oError);
3378
3426
  })
3379
3427
  .done(() => {
3380
3428
  oDeferred.resolve(iCount);
3381
3429
  });
3382
3430
  }
3383
3431
  })
3384
- .catch((vError) => {
3385
- oDeferred.reject(vError.message || vError);
3432
+ .catch((oError) => {
3433
+ oDeferred.reject(oError);
3386
3434
  });
3387
3435
  return oDeferred.promise();
3388
3436
  };
@@ -3406,9 +3454,9 @@ sap.ui.define([
3406
3454
  * @since 1.83.0
3407
3455
  * @deprecated since 1.120
3408
3456
  */
3409
- this._visitCustomBookmarks = function (oIdentifier, fnVisitor) {
3457
+ this._visitCustomBookmarks = async function (oIdentifier, fnVisitor) {
3410
3458
  if (!oIdentifier.chipId) {
3411
- return Promise.reject("_visitCustomBookmarks: Required parameter is missing: oIdentifier.chipId");
3459
+ throw new Error("_visitCustomBookmarks: Required parameter is missing: oIdentifier.chipId");
3412
3460
  }
3413
3461
  return new Promise((resolve, reject) => {
3414
3462
  this.getGroups()
@@ -3491,7 +3539,9 @@ sap.ui.define([
3491
3539
  return LaunchPageAdapter.prototype._visitBookmarks(sUrl, (oChipInstance) => {
3492
3540
  const oDeferred = new jQuery.Deferred();
3493
3541
  oChipInstance.remove(oDeferred.resolve.bind(oDeferred),
3494
- oDeferred.reject.bind(oDeferred));
3542
+ (sErrorMessage) => {
3543
+ oDeferred.reject(new Error(sErrorMessage));
3544
+ });
3495
3545
  return oDeferred.promise();
3496
3546
  });
3497
3547
  };
@@ -3519,7 +3569,9 @@ sap.ui.define([
3519
3569
  this.deleteCustomBookmarks = function (oIdentifier) {
3520
3570
  return this._visitCustomBookmarks(oIdentifier, (oChipInstance) => {
3521
3571
  return new Promise((resolve, reject) => {
3522
- oChipInstance.remove(resolve, reject);
3572
+ oChipInstance.remove(resolve, (sErrorMessage) => {
3573
+ reject(new Error(sErrorMessage));
3574
+ });
3523
3575
  });
3524
3576
  });
3525
3577
  };
@@ -3583,7 +3635,9 @@ sap.ui.define([
3583
3635
  })
3584
3636
  .then(() => {
3585
3637
  return new Promise((resolve, reject) => {
3586
- oChipInstance.updateConfiguration(oConfiguration, resolve, reject);
3638
+ oChipInstance.updateConfiguration(oConfiguration, resolve, (sErrorMessage) => {
3639
+ reject(new Error(sErrorMessage));
3640
+ });
3587
3641
  });
3588
3642
  })
3589
3643
  .then(() => {
@@ -3597,7 +3651,7 @@ sap.ui.define([
3597
3651
  oDeferred.resolve();
3598
3652
  })
3599
3653
  .catch((oError) => {
3600
- oDeferred.reject(oError.toString());
3654
+ oDeferred.reject(oError);
3601
3655
  });
3602
3656
 
3603
3657
  return oDeferred.promise();
@@ -3675,7 +3729,9 @@ sap.ui.define([
3675
3729
  return new Promise((resolve, reject) => {
3676
3730
  // chip might throw an error because of missing writeConfiguration contract
3677
3731
  try {
3678
- oChipInstance.updateConfiguration(oConfiguration, resolve, reject);
3732
+ oChipInstance.updateConfiguration(oConfiguration, resolve, (sErrorMessage) => {
3733
+ reject(new Error(sErrorMessage));
3734
+ });
3679
3735
  } catch (oError) {
3680
3736
  reject(oError);
3681
3737
  }
@@ -3694,7 +3750,9 @@ sap.ui.define([
3694
3750
  }
3695
3751
  return new Promise((resolve, reject) => {
3696
3752
  if (oBookmarkConfig.title) {
3697
- oChipInstance.setTitle(oBookmarkConfig.title, true, resolve, reject);
3753
+ oChipInstance.setTitle(oBookmarkConfig.title, true, resolve, (sErrorMessage) => {
3754
+ reject(new Error(sErrorMessage));
3755
+ });
3698
3756
  } else {
3699
3757
  resolve();
3700
3758
  }
@@ -3743,8 +3801,9 @@ sap.ui.define([
3743
3801
  return new Promise((resolve, reject) => {
3744
3802
  // There is no good way to access the raw data as it is normalized and well hidden in closures in sap.ushell_abap.pbServices.ui2
3745
3803
  // Therefore we trigger the allCatalogs request again which reads from the cache of the OData wrapper
3746
- oUI2PageBuildingService.readAllCatalogs(PAGE_ID_WITHOUT_TM, resolve, reject,
3747
- "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", "title", true);
3804
+ oUI2PageBuildingService.readAllCatalogs(PAGE_ID_WITHOUT_TM, resolve, (sErrorMessage) => {
3805
+ reject(new Error(sErrorMessage));
3806
+ }, "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", "title", true);
3748
3807
  });
3749
3808
  })
3750
3809
  .then((oResponse) => {
@@ -4,7 +4,7 @@
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
5
  *
6
6
  * @deprecated since 1.100
7
- * @version 1.140.0
7
+ * @version 1.141.1
8
8
  */
9
9
  sap.ui.define([
10
10
  "sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter"
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the ABAP
9
9
  * platform.
10
10
  *
11
- * @version 1.140.0
11
+ * @version 1.141.1
12
12
  */
13
13
  sap.ui.define([], () => {
14
14
  "use strict";
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the ABAP
9
9
  * platform.
10
10
  *
11
- * @version 1.140.0
11
+ * @version 1.141.1
12
12
  * @since 1.121
13
13
  */
14
14
  sap.ui.define([], () => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
- * @version 1.140.0
5
+ * @version 1.141.1
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",