Skip to content

fix: categorize analyze files 5xx errors as system - #1019

Merged
radu-mocanu merged 1 commit into
mainfrom
fix/analyze-files-provider-error-categorization
Aug 3, 2026
Merged

fix: categorize analyze files 5xx errors as system#1019
radu-mocanu merged 1 commit into
mainfrom
fix/analyze-files-provider-error-categorization

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • surface Analyze Files provider 5xx failures as System HTTP errors
  • preserve the provider status and error detail instead of reporting a generic Unknown failure

Why

Analyze Files invokes the LLM outside the main agent node, so provider 500 responses bypassed existing normalization and appeared as Unexpected Error with an Unknown category. This applies the same taxonomy used by the main LLM path.

Copilot AI review requested due to automatic review settings August 2, 2026 09:52

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.

Pull request overview

This PR aligns the Analyze Files tool’s error normalization with the main agent LLM execution path by converting provider HTTP failures into structured AgentRuntimeErrors, and it updates the HTTP-status → UiPathErrorCategory mapping so 5xx provider responses are surfaced as SYSTEM (while preserving status/detail where available).

Changes:

  • Normalize Analyze Files LLM call exceptions (new + legacy provider SDK errors) into the existing structured agent error taxonomy.
  • Update provider HTTP error categorization so 5xx statuses map to UiPathErrorCategory.SYSTEM (instead of UNKNOWN).
  • Add/adjust tests to validate 5xx categorization and ensure unknown remains for unclassified statuses.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Bumps package version to 0.15.1 in the lockfile.
pyproject.toml Bumps project version to 0.15.1.
src/uipath_langchain/agent/tools/internal_tools/analyze_files_tool.py Adds structured exception mapping for provider/LLM-client/legacy exceptions during Analyze Files LLM invocation.
src/uipath_langchain/agent/exceptions/licensing.py Introduces status→category helper and maps 5xx provider HTTP errors to SYSTEM.
tests/agent/tools/internal_tools/test_analyze_files_tool.py Adds a test ensuring provider 5xx errors are categorized as SYSTEM for Analyze Files.
tests/agent/test_licensing.py Updates/adds tests for 5xx→SYSTEM and keeps unclassified statuses as UNKNOWN.

@radu-mocanu
radu-mocanu force-pushed the fix/analyze-files-provider-error-categorization branch from 7950cc4 to 640414f Compare August 3, 2026 00:05
@radu-mocanu
radu-mocanu force-pushed the fix/analyze-files-provider-error-categorization branch from 640414f to b2b9d54 Compare August 3, 2026 06:27
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@radu-mocanu
radu-mocanu merged commit 797f74d into main Aug 3, 2026
45 checks passed
@radu-mocanu
radu-mocanu deleted the fix/analyze-files-provider-error-categorization branch August 3, 2026 10:44
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