Skip to content

Commit 6c32c6c

Browse files
committed
fix: catch ProcessLookupError
1 parent 1276865 commit 6c32c6c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-mcp"
3-
version = "0.0.33"
3+
version = "0.0.34"
44
description = "UiPath MCP SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_mcp/_cli/_runtime/_runtime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ async def _register(self) -> None:
239239

240240
# We don't continue with registration here - we'll do it after the context managers
241241

242-
except Exception as e:
242+
except BaseException as e:
243243
# Just log the exception during cleanup - it's expected
244+
# except (ProcessLookupError, ExceptionGroup) works with 3.11+
244245
if "ProcessLookupError" in str(e) or "ExceptionGroup" in str(e):
245246
logger.info("Process already terminated during cleanup - this is expected")
246247
else:
@@ -257,7 +258,7 @@ async def _register(self) -> None:
257258
raise UiPathMcpRuntimeError(
258259
"TIMEOUT_ERROR",
259260
"Server initialization timed out",
260-
"The server process did not respond in time. Verify environment variables are set correctly.",
261+
"The server process failed to initialize. Verify environment variables are set correctly.",
261262
UiPathErrorCategory.DEPLOYMENT,
262263
)
263264

0 commit comments

Comments
 (0)