Skip to content

[codex] fix unsupported attachment error mapping#102

Open
cotovanu-cristian wants to merge 1 commit into
mainfrom
codex/unsupported-attachment-error
Open

[codex] fix unsupported attachment error mapping#102
cotovanu-cristian wants to merge 1 commit into
mainfrom
codex/unsupported-attachment-error

Conversation

@cotovanu-cristian

Copy link
Copy Markdown
Collaborator

Summary

  • Add a typed UiPathUnsupportedAttachmentError with stable UNSUPPORTED_ATTACHMENT_FORMAT error_code.
  • Map Bedrock Converse unsupported-MIME ValueError chains into that typed UiPath error, preserving mime_type and provider_detail for downstream agent-specific mapping.
  • Dispatch client-side typed errors through a _CLIENT_SIDE_CLASSIFIERS registry, 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.
  • Bump uipath-llm-client to 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 root UiPathError, losing the user-actionable attachment semantics.

Validation

  • uv run pytest tests/langchain/features/test_exception_wrapping.py -q — 43 passed
  • uv run ruff check / ruff format --check on changed files — clean

Supersedes #101, which GitHub auto-closed after a force-push and refuses to reopen.

🤖 Generated with Claude Code

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>
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.

1 participant