Skip to content

Commit ace5740

Browse files
fix: switch error type
1 parent af9d26d commit ace5740

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

packages/uipath-platform/src/uipath/platform/context_grounding/_context_grounding_service.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,6 @@ def download_batch_transform_result(
10541054
if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
10551055
raise BatchTransformFailedException(
10561056
batch_transform_id=id,
1057-
status=batch_transform.last_batch_rag_status,
10581057
)
10591058
if batch_transform.last_batch_rag_status != BatchTransformStatus.SUCCESSFUL:
10601059
raise BatchTransformNotCompleteException(
@@ -1118,7 +1117,6 @@ async def download_batch_transform_result_async(
11181117
if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
11191118
raise BatchTransformFailedException(
11201119
batch_transform_id=id,
1121-
status=batch_transform.last_batch_rag_status,
11221120
)
11231121
if batch_transform.last_batch_rag_status != BatchTransformStatus.SUCCESSFUL:
11241122
raise BatchTransformNotCompleteException(

packages/uipath-platform/src/uipath/platform/errors/_batch_transform_failed_exception.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ class BatchTransformFailedException(Exception):
55
with a failed status, as opposed to still being in progress.
66
"""
77

8-
def __init__(self, batch_transform_id: str, status: str):
9-
self.message = (
10-
f"Batch transform '{batch_transform_id}' failed. Status: {status}"
11-
)
8+
def __init__(self, batch_transform_id: str):
9+
self.message = f"Batch transform '{batch_transform_id}' failed."
1210
super().__init__(self.message)

packages/uipath-platform/src/uipath/platform/resume_triggers/_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ async def read_trigger(self, trigger: UiPathResumeTrigger) -> Any | None:
326326
)
327327
except BatchTransformFailedException as e:
328328
raise UiPathFaultedTriggerError(
329-
ErrorCategory.USER,
329+
ErrorCategory.SYSTEM,
330330
f"{e.message}",
331331
) from e
332332
except BatchTransformNotCompleteException as e:

packages/uipath-platform/tests/services/test_hitl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ async def test_read_batch_rag_trigger_failed(
822822
task_id = "test-batch-rag-id"
823823
destination_path = "test/output.xlsx"
824824
mock_download_async = AsyncMock(
825-
side_effect=BatchTransformFailedException(task_id, "Failed")
825+
side_effect=BatchTransformFailedException(task_id)
826826
)
827827

828828
with patch(

0 commit comments

Comments
 (0)