Skip to content

fix(agent): include the Orchestrator error message in the StartJobs 404 tool error - #1060

Merged
andreiancuta-uipath merged 1 commit into
mainfrom
fix/startjobs-404-server-message
Sep 1, 2026
Merged

fix(agent): include the Orchestrator error message in the StartJobs 404 tool error#1060
andreiancuta-uipath merged 1 commit into
mainfrom
fix/startjobs-404-server-message

Conversation

@andreiancuta-uipath

@andreiancuta-uipath andreiancuta-uipath commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Why

Orchestrator returns 404 with the generic error code 1002 (ItemNotFound) for several distinct lookups inside StartJobs — release not found (AssociatedProcessNotFound), attachment not found (AttachmentNotFound), and others. The runtime mapped all of them to "Could not find process for tool '{tool}'" and dropped the server's message, so job logs and traces cannot tell which lookup actually failed.

What

  • Append Server message: {message} to the (404, "1002") template in _START_JOBS_ERRORS. raise_for_enriched already fills {message} from EnrichedException.error_info, falling back to an empty string when the response body has none.
  • Unit tests for both cases (server message present / absent).

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 1, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Pull request overview

This PR improves runtime diagnostics for Orchestrator StartJobs failures by preserving Orchestrator’s own error message when a (404, "1002") (ItemNotFound) response occurs, so traces/logs show which underlying lookup actually failed.

Changes:

  • Extend the _START_JOBS_ERRORS[(404, "1002")] detail template to append Server message: {message}.
  • Add unit tests validating the enriched error detail both when the server message is present and when it is absent.
File summaries
File Description
src/uipath_langchain/agent/tools/process_tool.py Appends Orchestrator-provided {message} to the StartJobs 404/1002 error detail template.
tests/agent/test_exception_helpers.py Adds coverage ensuring raise_for_enriched formats the StartJobs template correctly with and without a server message.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@andreiancuta-uipath
andreiancuta-uipath force-pushed the fix/startjobs-404-server-message branch 2 times, most recently from 6af4514 to 4f0729a Compare September 1, 2026 12:54
…04 tool error

Orchestrator returns 404 with the generic error code 1002 for several
distinct lookups inside StartJobs (release not found, attachment not
found, ...), and the runtime dropped the server message, making every
such failure read as "Could not find process". Append the server
message to the mapped error so job logs and traces name the failing
lookup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andreiancuta-uipath
andreiancuta-uipath enabled auto-merge (squash) September 1, 2026 13:55
@andreiancuta-uipath
andreiancuta-uipath force-pushed the fix/startjobs-404-server-message branch from 4f0729a to 6ae7810 Compare September 1, 2026 13:55
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@andreiancuta-uipath
andreiancuta-uipath merged commit dab8834 into main Sep 1, 2026
44 checks passed
@andreiancuta-uipath
andreiancuta-uipath deleted the fix/startjobs-404-server-message branch September 1, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants