File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/uipath_langchain/_utils Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " uipath-langchain"
3- version = " 0.0.122 "
3+ version = " 0.0.123 "
44description = " UiPath Langchain"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.10"
Original file line number Diff line number Diff line change 1717 stop_after_attempt ,
1818 wait_exponential_jitter ,
1919)
20+ from uipath ._cli ._runtime ._contracts import UiPathErrorCategory
2021from uipath ._utils ._ssl_context import get_httpx_client_kwargs
2122
23+ from uipath_langchain ._cli ._runtime ._exception import LangGraphRuntimeError
2224from uipath_langchain ._utils ._settings import (
2325 UiPathClientFactorySettings ,
2426 UiPathClientSettings ,
@@ -348,6 +350,19 @@ def _make_status_error(
348350 return openai .AuthenticationError (err_msg , response = response , body = data )
349351
350352 if response .status_code == 403 :
353+ # Check if this is a license-specific error
354+ if isinstance (body , dict ):
355+ title = body .get ("title" , "" ).lower ()
356+ if title == "license not available" :
357+ raise LangGraphRuntimeError (
358+ code = "LICENSE_NOT_AVAILABLE" ,
359+ title = body .get ("title" , "License Not Available" ),
360+ detail = body .get (
361+ "detail" , "License not available for this service"
362+ ),
363+ category = UiPathErrorCategory .DEPLOYMENT ,
364+ )
365+
351366 return openai .PermissionDeniedError (err_msg , response = response , body = data )
352367
353368 if response .status_code == 404 :
You can’t perform that action at this time.
0 commit comments