AWS Bedrock Validation Exception Not Handled.
Author: jczstudiosCreated Apr 17, 2025Updated Sep 9, 2026
Labelsbugtriage
What Happened?
When uploading an image through Portkey, the outgoing request to Bedrock API returned a 200 with a "application/vnd.amazon.eventstream". However, the stream's sole message was exception{"message":"The model returned the following errors: Could not process image"}. Thus, a fallback was not triggered even though no data (besides the error) was able to be streamed.
What Should Have Happened?
There should be handling of these errors or a way to surface them to applications using Portkey.
Relevant Code Snippet
URL being accessed by Portkey: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-5-sonnet-20241022-v2:0/converse-stream
Your Twitter/LinkedIn
No response
Source: Portkey-AI/gateway