Skip to content

fix(platform): name the failing trigger type in resume-trigger errors [MST-18258] - #1993

Draft
IevgenUiPath wants to merge 1 commit into
mainfrom
fix/MST-18258-resume-trigger-error-text
Draft

IevgenUiPath wants to merge 1 commit into
mainfrom
fix/MST-18258-resume-trigger-error-text

Conversation

@IevgenUiPath

@IevgenUiPath IevgenUiPath commented Nov 13, 2026 •

Copy link
Copy Markdown

Jira: MST-18258

Problem

Jira MST-18258: when an agent job faults while creating its resume trigger, UiPathResumeTriggerCreator.create_trigger wraps every non-UiPathFaultedTriggerError exception as "Failed to create HITL action", whatever the trigger type. In production that wrapper message is the only explanation the customer sees: uipath-runtime turns the faulted-trigger error into RESUME_TRIGGER_ERROR / "Resume trigger error" with the wrapper's message as the detail, and Maestro relays that detail. Over the last 30 days this fired on 18 instances (samples 20883f43, 491c271a, 0e1efe28), including cases where the failing trigger was a deep-RAG job, an IXP extraction or a plain exception with an empty message, all shown as the same generic "HITL action" text.

Change

  • create_trigger now determines trigger_type before the try, so the except Exception wrapper can name it: "Failed to create resume trigger of type DeepRag" (falls back to "Failed to create resume trigger" if the type could not be determined).
  • The wrapper detail carries the inner exception type and text ("RuntimeError: tasks service unavailable"); a message-less exception keeps its type name instead of rendering as an empty detail.
  • ErrorCategory.SYSTEM and from e are kept. The UiPathFaultedTriggerError pass-through, the handlers' logic and all public signatures are unchanged.
  • uipath-platform bumped to 0.3.8 (pyproject + both lock files), per the repo's version-availability check.

Tests

New tests in packages/uipath-platform/tests/services/test_hitl.py:

  • wrapper message names the trigger type (Task and DeepRag) and the detail carries the inner exception type and text
  • a message-less exception leaves its type in the detail
  • a UiPathFaultedTriggerError raised by a handler is re-raised unchanged (same object, category, message, detail)

Run from packages/uipath-platform (uv, Python 3.11.18):

  • uv sync --locked --all-extras
  • uv run pytest -> 2094 passed, 7 skipped (credential-gated LLM integration tests), 4 deselected (e2e)
  • uv run ruff check . -> All checks passed
  • uv run ruff format --check . -> 237 files already formatted
  • uv run mypy --config-file pyproject.toml . -> Success: no issues found in 237 source files

Out of scope

The individual root causes behind the instances (a missing context-grounding index, a StopIteration during task creation) are not addressed here; this PR only makes the surfaced error say which trigger failed and why.

🤖 Generated with Claude Code

… [MST-18258]

When a resume-trigger handler raises a plain exception, create_trigger
wrapped it as "Failed to create HITL action" for every trigger type, so
Maestro showed the same text whether the failing trigger was a task, a
deep RAG job or an IXP extraction. The wrapper message now names the
trigger type ("Failed to create resume trigger of type DeepRag") and the
detail carries the inner exception type and text, so a message-less
exception no longer renders as an empty detail.

The UiPathFaultedTriggerError pass-through, the handlers and the public
signatures are unchanged. Bumps uipath-platform to 0.3.8.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Nov 13, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant