Skip to content

BedrockAgentCoreApp crashes with UnicodeDecodeError when session id contains non-ASCII characters #589

Description

@jesseturner21

Description

When invoking an agent with a session id containing non-ASCII characters (e.g. sesión-123), the runtime crashes with a UnicodeDecodeError instead of returning a validation error.

Steps to reproduce

  1. Create a minimal app with BedrockAgentCoreApp and a single @app.entrypoint.
  2. Invoke it with header X-Amzn-Bedrock-AgentCore-Runtime-Session-Id: sesión-123.
  3. The request fails with a 500 and the traceback below.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)

Expected behavior

Either the session id is accepted, or a 400 with a clear validation message is returned.


Note: test issue filed by @jesseturner21 to validate the issue auto-triage workflow; will be closed after verification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions