Skip to content

fix: batch transform failure handling#1573

Open
CalebMartinUiPath wants to merge 2 commits intomainfrom
caleb/fix-batchrag-failed-error
Open

fix: batch transform failure handling#1573
CalebMartinUiPath wants to merge 2 commits intomainfrom
caleb/fix-batchrag-failed-error

Conversation

@CalebMartinUiPath
Copy link
Copy Markdown
Contributor

@CalebMartinUiPath CalebMartinUiPath commented Apr 17, 2026

failed batch transforms were being incorrectly handled as in progress. Causing the agent to loop waiting for it to finish. With this change agent execution will end properly.

@github-actions github-actions bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Apr 17, 2026
@CalebMartinUiPath CalebMartinUiPath force-pushed the caleb/fix-batchrag-failed-error branch from b00d64f to c1c63d9 Compare April 17, 2026 00:35
batch_transform = self.retrieve_batch_transform(
id=id, index_name=index_name
)
if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the same logic apply to DeepRAG?

if batch_transform.last_batch_rag_status == BatchTransformStatus.FAILED:
raise BatchTransformFailedException(
batch_transform_id=id,
status=batch_transform.last_batch_rag_status,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the status redundant?

)
except BatchTransformFailedException as e:
raise UiPathFaultedTriggerError(
ErrorCategory.USER,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this a user error? can't it be marked as failed due to other conditions in ecs?

in ecs we have:

try {
// do various async things
} catch (Exception ex)
            {
                ex = ex.Unwrap();

                if (info != null)
                {
                    var errorMessage = (ex as LocalizedException)?.Message
                                       ?? ErrorMessages.BatchRag_InternalFailure;
                    await Workflow.ExecuteLocalActivityAsync(
                        (IBatchRagReportingActivities a) => a.ReportFailureAsync(batchRagId, errorMessage),
                        new LocalActivityOptions
                        {
                            StartToCloseTimeout = TimeSpan.FromMinutes(1),
                            RetryPolicy = new RetryPolicy { MaximumAttempts = 3 }
                        });
                }
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants