fix(agent): include the Orchestrator error message in the StartJobs 404 tool error - #1060
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 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 appendServer 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
force-pushed
the
fix/startjobs-404-server-message
branch
2 times, most recently
from
September 1, 2026 12:54
6af4514 to
4f0729a
Compare
radu-mocanu
approved these changes
Sep 1, 2026
…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
enabled auto-merge (squash)
September 1, 2026 13:55
andreiancuta-uipath
force-pushed
the
fix/startjobs-404-server-message
branch
from
September 1, 2026 13:55
4f0729a to
6ae7810
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
Orchestrator returns 404 with the generic error code
1002(ItemNotFound) for several distinct lookups insideStartJobs— 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
Server message: {message}to the(404, "1002")template in_START_JOBS_ERRORS.raise_for_enrichedalready fills{message}fromEnrichedException.error_info, falling back to an empty string when the response body has none.🤖 Generated with Claude Code