Skip to content

Commit d251320

Browse files
committed
Improve logging and response case in server/getInfo
1 parent db38951 commit d251320

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/finecode/wm_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ async def connect(self, host: str, port: int) -> None:
9191
log_path = info.get("log_file_path")
9292
if log_path:
9393
logger.info(f"WM Server log file: {log_path}")
94-
except Exception:
95-
pass # non-critical, don't block connection
94+
else:
95+
logger.info("WM Server returned no log file path")
96+
except Exception as exception:
97+
logger.info(f"Failed to get WM Server log file path: {exception}")
9698

9799
async def close(self) -> None:
98100
if self._reader_task is not None:

src/finecode/wm_server/wm_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,9 @@ async def _handle_server_get_info(
643643
Returns static information about the running WM Server instance,
644644
including the path to its log file.
645645
"""
646-
return {
646+
return _NoConvert({
647647
"log_file_path": str(_log_file_path) if _log_file_path is not None else None,
648-
}
648+
})
649649

650650

651651
async def _handle_server_reset(

0 commit comments

Comments
 (0)