Commit 6d41b71
committed
fix: guard reconcileOrganization against subscribeToStoreOnDataLayer falsy return
Bugbot flagged an inconsistency introduced by af06a65: governance sync
now correctly treats both a thrown exception and a falsy return from
subscribeToStoreOnDataLayer as a failure, but V1/V2 reconcileOrganization
still only guarded thrown exceptions.
subscribeToStoreOnDataLayer in src/datalayer/persistance.js returns
false (without throwing) on the two most common failure paths:
- No storeId provided
- getSubscriptions() RPC failure (datalayer unreachable)
Without the falsy-return check, the dominant datalayer-unreachable
failure slips past the try/catch, and the subsequent
getDataLayerStoreSyncStatus call (which also fails when the store is
not subscribed) produces a misleading "not yet synced" log instead of
a clear "could not subscribe" message.
Mirrors the subscribe-first pattern af06a65 added to governance sync.
Both subscribe-first and the falsy-return guard are no-ops in simulator
mode (wrapped in !USE_SIMULATOR for V2, skipped entirely for V1 via the
function's top-level simulator guard).1 parent af06a65 commit 6d41b71
2 files changed
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
837 | 843 | | |
838 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
839 | 851 | | |
840 | 852 | | |
841 | | - | |
| 853 | + | |
842 | 854 | | |
843 | 855 | | |
844 | 856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
1860 | 1866 | | |
1861 | 1867 | | |
1862 | | - | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1863 | 1875 | | |
1864 | 1876 | | |
1865 | | - | |
| 1877 | + | |
1866 | 1878 | | |
1867 | 1879 | | |
1868 | 1880 | | |
| |||
0 commit comments