Skip to content

Commit 6ce8f93

Browse files
fix: pass through error details to CAS for unrecognized error IDs
1 parent a4a6cb9 commit 6ce8f93

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/uipath/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"
3-
version = "2.10.48"
3+
version = "2.10.49"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

packages/uipath/src/uipath/_cli/_chat/_bridge.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _extract_error_info(error: Exception) -> tuple[str, str]:
7575
message = title or detail or _CAS_ERROR_MESSAGES[CASErrorId.DEFAULT_ERROR]
7676
return code, message
7777

78-
return CASErrorId.DEFAULT_ERROR, _CAS_ERROR_MESSAGES[CASErrorId.DEFAULT_ERROR]
78+
return CASErrorId.DEFAULT_ERROR, str(error) or _CAS_ERROR_MESSAGES[CASErrorId.DEFAULT_ERROR]
7979

8080

8181
def _resolve_cas_error(error: Exception) -> tuple[str, str]:
@@ -89,7 +89,10 @@ def _resolve_cas_error(error: Exception) -> tuple[str, str]:
8989
error_code, error_message = _extract_error_info(error)
9090
suffix = error_code.rsplit(".", 1)[-1] if error_code else ""
9191
cas_error_id = _CAS_ERROR_ID_MAP.get(suffix, CASErrorId.DEFAULT_ERROR)
92-
cas_message = _CAS_ERROR_MESSAGES.get(cas_error_id) or error_message
92+
if cas_error_id == CASErrorId.DEFAULT_ERROR:
93+
cas_message = error_message
94+
else:
95+
cas_message = _CAS_ERROR_MESSAGES.get(cas_error_id) or error_message
9396
return cas_error_id, cas_message
9497

9598

packages/uipath/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)