Skip to content

Commit 1dd7ee3

Browse files
authored
Merge pull request #105 from UiPath/fix/register_folder_scoped
fix: exception handling missing folder
2 parents 31df562 + cf8b503 commit 1dd7ee3

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
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.88"
3+
version = "0.0.89"
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: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,16 @@ async def _handle_signalr_close(self) -> None:
259259

260260
async def _register(self) -> None:
261261
"""Register the MCP server with UiPath."""
262+
263+
folder_key = os.environ.get("UIPATH_FOLDER_KEY")
264+
if not folder_key:
265+
raise UiPathMcpRuntimeError(
266+
"REGISTRATION_ERROR",
267+
"No UIPATH_FOLDER_KEY environment variable set.",
268+
"Please set the UIPATH_FOLDER_KEY environment variable.",
269+
UiPathErrorCategory.USER,
270+
)
271+
262272
initialization_successful = False
263273
tools_result = None
264274
server_stderr_output = ""
@@ -375,14 +385,6 @@ async def _register(self) -> None:
375385

376386
logger.info(client_info)
377387

378-
folder_key = os.environ.get("UIPATH_FOLDER_KEY")
379-
if not folder_key:
380-
raise UiPathMcpRuntimeError(
381-
"REGISTRATION_ERROR",
382-
"No UIPATH_FOLDER_KEY environment variable set.",
383-
UiPathErrorCategory.USER,
384-
)
385-
386388
# Register with UiPath MCP Server
387389
await self._uipath.api_client.request_async(
388390
"POST",

0 commit comments

Comments
 (0)