[codex] fix unsupported attachment error mapping#102
Open
cotovanu-cristian wants to merge 1 commit into
Open
Conversation
f278675 to
ce7246a
Compare
Map Bedrock Converse unsupported-MIME ValueError chains into a typed UiPathUnsupportedAttachmentError (stable UNSUPPORTED_ATTACHMENT_FORMAT code, preserved mime_type/provider_detail). Dispatch client-side typed errors through a _CLIENT_SIDE_CLASSIFIERS registry tried ahead of HTTP status mapping, so future non-HTTP error propagations are a one-line addition rather than a dispatcher edit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ce7246a to
c692e72
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.
Summary
UiPathUnsupportedAttachmentErrorwith stableUNSUPPORTED_ATTACHMENT_FORMATerror_code.ValueErrorchains into that typed UiPath error, preservingmime_typeandprovider_detailfor downstream agent-specific mapping._CLIENT_SIDE_CLASSIFIERSregistry, tried ahead of HTTP status mapping (a typed semantic error is more actionable than the raw status). Adding the next non-HTTP error propagation is a one-line append rather than a dispatcher edit.uipath-llm-clientto 1.15.1 (1.15.0 already published without this API).Root cause
Bedrock Converse request conversion can reject file blocks locally with a bare
ValueError("Unsupported MIME type") before any HTTP response exists. The generic provider wrapper previously mapped that to the rootUiPathError, losing the user-actionable attachment semantics.Validation
uv run pytest tests/langchain/features/test_exception_wrapping.py -q— 43 passeduv run ruff check/ruff format --checkon changed files — clean🤖 Generated with Claude Code