From 9377301fa84a438180cf8fa842aec65f6c141fdb Mon Sep 17 00:00:00 2001 From: giuliastf Date: Thu, 30 Oct 2025 11:28:57 +0200 Subject: [PATCH] fix(error_code): add UiPathErrorCode --- pyproject.toml | 4 ++-- src/uipath_langchain/_utils/_request_mixin.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 197716e7..cd0941cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "uipath-langchain" -version = "0.0.147" +version = "0.0.148" description = "UiPath Langchain" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" dependencies = [ - "uipath>=2.1.110, <2.2.0", + "uipath>=2.1.123, <2.2.0", "langgraph>=0.5.0, <0.7.0", "langchain-core>=0.3.34", "langgraph-checkpoint-sqlite>=2.0.3", diff --git a/src/uipath_langchain/_utils/_request_mixin.py b/src/uipath_langchain/_utils/_request_mixin.py index 8f0626ce..afd8d95d 100644 --- a/src/uipath_langchain/_utils/_request_mixin.py +++ b/src/uipath_langchain/_utils/_request_mixin.py @@ -17,7 +17,11 @@ stop_after_attempt, wait_exponential_jitter, ) -from uipath._cli._runtime._contracts import UiPathErrorCategory, UiPathRuntimeError +from uipath._cli._runtime._contracts import ( + UiPathErrorCategory, + UiPathErrorCode, + UiPathRuntimeError, +) from uipath._utils._ssl_context import get_httpx_client_kwargs from uipath_langchain._cli._runtime._exception import ( @@ -59,7 +63,7 @@ def _get_access_token(data): return get_uipath_token_header(settings) except ValidationError: raise UiPathRuntimeError( - code="AUTHENTICATION_REQUIRED", + UiPathErrorCode.AUTHENTICATION_REQUIRED, title="Authorization required", detail="Authorization required. Please run uipath auth", category=UiPathErrorCategory.USER,