feat(src/services): improve error handlingwith detailed logging

Replace silent exception swallowing with explicit logging via logger.error to aid debugging and observability
This commit is contained in:
sankalp committed 2026-06-17 05:20:44 +05:45
1 parent 260d215b6b
commit 48231b3bc2
5 files changed
+27 -25

No files matched your search

+6 -6
View File
@@ -343,8 +343,8 @@ class NetworkClient(Service):
return "wifi"
if "ethernet" in str(conn_type):
return "wired"
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
return None
def is_network_saved(self, ssid: str) -> bool:
@@ -391,8 +391,8 @@ class NetworkClient(Service):
if handler_id:
try:
device.disconnect_by_func(_on_state_changed)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
if callback:
handler_id.append(device.connect("state-changed", _on_state_changed))
@@ -430,8 +430,8 @@ class NetworkClient(Service):
if handler_id:
try:
device.disconnect_by_func(_on_state_changed)
except Exception:
pass
except Exception as e:
logger.error(f"An error occurred: {e}")
handler_id.append(device.connect("state-changed", _on_state_changed))