Skip to content

[codex] fix unsupported attachment error mapping#101

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

[codex] fix unsupported attachment error mapping#101
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.
  • Preserve MIME type and provider detail for downstream agent-specific mapping.
  • Bump uipath-llm-client to 1.15.1 because 1.15.0 already exists without this API.

Root cause

Bedrock Converse request conversion can reject file blocks locally with a bare ValueError containing Unsupported MIME type before an 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
  • uv run ruff check src/uipath/llm_client/init.py src/uipath/llm_client/utils/exceptions.py tests/langchain/features/test_exception_wrapping.py
  • uv run ruff format --check src/uipath/llm_client/init.py src/uipath/llm_client/utils/exceptions.py tests/langchain/features/test_exception_wrapping.py
  • git diff --check

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