Commit 2c1326b
committed
fix: guard importOrganization against subscribeToStoreOnDataLayer falsy return
Mirrors the pattern established in #1600 af06a65 (for governance sync)
and 6d41b71 (for reconcileOrganization).
subscribeToStoreOnDataLayer in src/datalayer/persistance.js returns
false (without throwing) on the common failure paths:
- No storeId provided
- getSubscriptions() RPC failure (datalayer unreachable)
Without the falsy-return check, the dominant datalayer-unreachable
failure would slip past the try/catch, and the subsequent
getDataLayerStoreSyncStatus call (which also fails when the store is
not subscribed) would produce a misleading "not yet synced" log.
Applies to both V1 and V2 importOrganization at two subscribe call
sites each: the pre-existing orgUid subscribe at the top of the
function, and the new singleton-store subscribe added in this PR.
Both are adjacent in the same function; fixing only one would leave
an internal inconsistency that a reviewer would flag.1 parent 73d674b commit 2c1326b
2 files changed
Lines changed: 48 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
962 | 968 | | |
963 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
964 | 976 | | |
965 | 977 | | |
966 | | - | |
| 978 | + | |
967 | 979 | | |
968 | 980 | | |
969 | 981 | | |
| |||
1013 | 1025 | | |
1014 | 1026 | | |
1015 | 1027 | | |
1016 | | - | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1017 | 1037 | | |
1018 | 1038 | | |
1019 | | - | |
| 1039 | + | |
1020 | 1040 | | |
1021 | 1041 | | |
1022 | 1042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1597 | 1597 | | |
1598 | 1598 | | |
1599 | 1599 | | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
1600 | 1606 | | |
1601 | | - | |
1602 | | - | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1603 | 1614 | | |
1604 | 1615 | | |
1605 | | - | |
| 1616 | + | |
1606 | 1617 | | |
1607 | 1618 | | |
1608 | 1619 | | |
| |||
1653 | 1664 | | |
1654 | 1665 | | |
1655 | 1666 | | |
1656 | | - | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
1657 | 1676 | | |
1658 | 1677 | | |
1659 | | - | |
| 1678 | + | |
1660 | 1679 | | |
1661 | 1680 | | |
1662 | 1681 | | |
| |||
0 commit comments