status/network: Catch errors when fetching client

Otherwise any unrelated errors in that function are hidden,
because exceptions in async functions are turned into promise
rejections (and JS cannot know that we won't handle it at a later
point).

It wouldn't happen to me of course 😉

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2406>
This commit is contained in:
Florian Müllner 2022-08-01 16:55:12 +02:00
parent d9d70c162d
commit af132dd884

View File

@ -1749,7 +1749,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._ctypes[NM.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
this._ctypes[NM.SETTING_WIREGUARD_SETTING_NAME] = NMConnectionCategory.VPN;
this._getClient();
this._getClient().catch(logError);
}
async _getClient() {