uipath 2.0.80__py3-none-any.whl → 2.0.81__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uipath/_services/_base_service.py +13 -2
- uipath/_services/processes_service.py +0 -1
- uipath/models/exceptions.py +23 -0
- {uipath-2.0.80.dist-info → uipath-2.0.81.dist-info}/METADATA +1 -1
- {uipath-2.0.80.dist-info → uipath-2.0.81.dist-info}/RECORD +8 -8
- {uipath-2.0.80.dist-info → uipath-2.0.81.dist-info}/WHEEL +0 -0
- {uipath-2.0.80.dist-info → uipath-2.0.81.dist-info}/entry_points.txt +0 -0
- {uipath-2.0.80.dist-info → uipath-2.0.81.dist-info}/licenses/LICENSE +0 -0
@@ -8,6 +8,7 @@ from httpx import (
|
|
8
8
|
Client,
|
9
9
|
ConnectTimeout,
|
10
10
|
Headers,
|
11
|
+
HTTPStatusError,
|
11
12
|
Response,
|
12
13
|
TimeoutException,
|
13
14
|
)
|
@@ -25,6 +26,7 @@ from .._execution_context import ExecutionContext
|
|
25
26
|
from .._utils import UiPathUrl, user_agent_value
|
26
27
|
from .._utils._ssl_context import get_httpx_client_kwargs
|
27
28
|
from .._utils.constants import HEADER_USER_AGENT
|
29
|
+
from ..models.exceptions import EnrichedException
|
28
30
|
|
29
31
|
|
30
32
|
def is_retryable_exception(exception: BaseException) -> bool:
|
@@ -104,7 +106,12 @@ class BaseService:
|
|
104
106
|
scoped_url = self._url.scope_url(str(url), scoped)
|
105
107
|
|
106
108
|
response = self._client.request(method, scoped_url, **kwargs)
|
107
|
-
|
109
|
+
|
110
|
+
try:
|
111
|
+
response.raise_for_status()
|
112
|
+
except HTTPStatusError as e:
|
113
|
+
# include the http response in the error message
|
114
|
+
raise EnrichedException(e) from e
|
108
115
|
|
109
116
|
return response
|
110
117
|
|
@@ -136,8 +143,12 @@ class BaseService:
|
|
136
143
|
scoped_url = self._url.scope_url(str(url), scoped)
|
137
144
|
|
138
145
|
response = await self._client_async.request(method, scoped_url, **kwargs)
|
139
|
-
response.raise_for_status()
|
140
146
|
|
147
|
+
try:
|
148
|
+
response.raise_for_status()
|
149
|
+
except HTTPStatusError as e:
|
150
|
+
# include the http response in the error message
|
151
|
+
raise EnrichedException(e) from e
|
141
152
|
return response
|
142
153
|
|
143
154
|
@property
|
uipath/models/exceptions.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
|
3
|
+
from httpx import HTTPStatusError
|
4
|
+
|
3
5
|
|
4
6
|
class IngestionInProgressException(Exception):
|
5
7
|
"""An exception that is triggered when a search is attempted on an index that is currently undergoing ingestion."""
|
@@ -11,3 +13,24 @@ class IngestionInProgressException(Exception):
|
|
11
13
|
else:
|
12
14
|
self.message = f"index '{index_name}' is currently queued for ingestion"
|
13
15
|
super().__init__(self.message)
|
16
|
+
|
17
|
+
|
18
|
+
class EnrichedException(Exception):
|
19
|
+
def __init__(self, error: HTTPStatusError) -> None:
|
20
|
+
# Extract the relevant details from the HTTPStatusError
|
21
|
+
status_code = error.response.status_code if error.response else "Unknown"
|
22
|
+
url = str(error.request.url) if error.request else "Unknown"
|
23
|
+
response_content = (
|
24
|
+
error.response.content.decode("utf-8")
|
25
|
+
if error.response and error.response.content
|
26
|
+
else "No content"
|
27
|
+
)
|
28
|
+
|
29
|
+
enriched_message = (
|
30
|
+
f"\nRequest URL: {url}"
|
31
|
+
f"\nStatus Code: {status_code}"
|
32
|
+
f"\nResponse Content: {response_content}"
|
33
|
+
)
|
34
|
+
|
35
|
+
# Initialize the parent Exception class with the formatted message
|
36
|
+
super().__init__(enriched_message)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.81
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
@@ -46,7 +46,7 @@ uipath/_cli/_utils/_parse_ast.py,sha256=A-QToBIf-oP7yP2DQTHO6blkk6ik5z_IeaIwtEWO
|
|
46
46
|
uipath/_cli/_utils/_processes.py,sha256=q7DfEKHISDWf3pngci5za_z0Pbnf_shWiYEcTOTCiyk,1855
|
47
47
|
uipath/_cli/_utils/_tracing.py,sha256=2igb03j3EHjF_A406UhtCKkPfudVfFPjUq5tXUEG4oo,1541
|
48
48
|
uipath/_services/__init__.py,sha256=10xtw3ENC30yR9CCq_b94RMZ3YrUeyfHV33yWYUd8tU,896
|
49
|
-
uipath/_services/_base_service.py,sha256=
|
49
|
+
uipath/_services/_base_service.py,sha256=twcUCLS_V4D1kxcJt6lckd7rqsVRcy4mfHOflJpu1k0,5830
|
50
50
|
uipath/_services/actions_service.py,sha256=LYKvG4VxNGQgZ46AzGK9kI1Txb-YmVvZj5ScPOue8Ls,15989
|
51
51
|
uipath/_services/api_client.py,sha256=hcof0EMa4-phEHD1WlO7Tdfzq6aL18Sbi2aBE7lJm1w,1821
|
52
52
|
uipath/_services/assets_service.py,sha256=acqWogfhZiSO1eeVYqFxmqWGSTmrW46QxI1J0bJe3jo,11918
|
@@ -57,7 +57,7 @@ uipath/_services/context_grounding_service.py,sha256=EBf7lIIYz_s1ubf_07OAZXQHjS8
|
|
57
57
|
uipath/_services/folder_service.py,sha256=9JqgjKhWD-G_KUnfUTP2BADxL6OK9QNZsBsWZHAULdE,2749
|
58
58
|
uipath/_services/jobs_service.py,sha256=CnDd7BM4AMqcMIR1qqu5ohhxf9m0AF4dnGoF4EX38kw,30872
|
59
59
|
uipath/_services/llm_gateway_service.py,sha256=ZdKRLdEVL8Zkcl9NDT5AKADxnjqeMIuOe5H2Oy7hYKw,9421
|
60
|
-
uipath/_services/processes_service.py,sha256=
|
60
|
+
uipath/_services/processes_service.py,sha256=Pk6paw7e_a-WvVcfKDLuyj1p--pvNRTXwZNYIwDdYzo,5726
|
61
61
|
uipath/_services/queues_service.py,sha256=VaG3dWL2QK6AJBOLoW2NQTpkPfZjsqsYPl9-kfXPFzA,13534
|
62
62
|
uipath/_utils/__init__.py,sha256=VdcpnENJIa0R6Y26NoxY64-wUVyvb4pKfTh1wXDQeMk,526
|
63
63
|
uipath/_utils/_endpoint.py,sha256=yYHwqbQuJIevpaTkdfYJS9CrtlFeEyfb5JQK5osTCog,2489
|
@@ -80,7 +80,7 @@ uipath/models/connections.py,sha256=perIqW99YEg_0yWZPdpZlmNpZcwY_toR1wkqDUBdAN0,
|
|
80
80
|
uipath/models/context_grounding.py,sha256=S9PeOlFlw7VxzzJVR_Fs28OObW3MLHUPCFqNgkEz24k,1315
|
81
81
|
uipath/models/context_grounding_index.py,sha256=0ADlH8fC10qIbakgwU89pRVawzJ36TiSDKIqOhUdhuA,2580
|
82
82
|
uipath/models/errors.py,sha256=gPyU4sKYn57v03aOVqm97mnU9Do2e7bwMQwiSQVp9qc,461
|
83
|
-
uipath/models/exceptions.py,sha256=
|
83
|
+
uipath/models/exceptions.py,sha256=zfcwoK1W_68R6e_8wKd4YG-9_OZsNzBQLngENTG56wU,1404
|
84
84
|
uipath/models/interrupt_models.py,sha256=UzuVTMVesI204YQ4qFQFaN-gN3kksddkrujofcaC7zQ,881
|
85
85
|
uipath/models/job.py,sha256=f9L6_kg_VP0dAYvdcz1DWEWzy4NZPdlpHREod0uNK1E,3099
|
86
86
|
uipath/models/llm_gateway.py,sha256=rUIus7BrUuuRriXqSJUE9FnjOyQ7pYpaX6hWEYvA6AA,1923
|
@@ -95,8 +95,8 @@ uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,185
|
|
95
95
|
uipath/tracing/_utils.py,sha256=ZeensQexnw69jVcsVrGyED7mPlAU-L1agDGm6_1A3oc,10388
|
96
96
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
97
97
|
uipath/utils/_endpoints_manager.py,sha256=hiGEu6vyfQJoeiiql6w21TNiG6tADUfXlVBimxPU1-Q,4160
|
98
|
-
uipath-2.0.
|
99
|
-
uipath-2.0.
|
100
|
-
uipath-2.0.
|
101
|
-
uipath-2.0.
|
102
|
-
uipath-2.0.
|
98
|
+
uipath-2.0.81.dist-info/METADATA,sha256=eaGtKIpbDbMq7-5xMj88FpQewyEFDFv7h8f58NHPAuk,6462
|
99
|
+
uipath-2.0.81.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
100
|
+
uipath-2.0.81.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
101
|
+
uipath-2.0.81.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
102
|
+
uipath-2.0.81.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|