Skip to content

fix(executor): include exception type when .args is empty#543

Open
wjgong001 wants to merge 1 commit into
langwatch:mainfrom
wjgong001:main
Open

fix(executor): include exception type when .args is empty#543
wjgong001 wants to merge 1 commit into
langwatch:mainfrom
wjgong001:main

Conversation

@wjgong001

Copy link
Copy Markdown

When an adapter raises an exception with no message (e.g. asyncio.TimeoutError, bare Exception()), the re-raised RuntimeError rendered as [AdapterName] with empty body.

This PR adds a fallback: if str(e) is empty, use <e.__class__.__name__: no message> so operators can tell what failed without inspecting __cause__.

Fixes #500

Changes

  • python/scenario/scenario_executor.py: line 898-899

Before

RuntimeError: [PipecatAgentAdapter]

After

RuntimeError: [PipecatAgentAdapter] <TimeoutError: no message>

Test

  • Need guidance on where to add regression test

When an adapter raises an exception with no message (e.g.
asyncio.TimeoutError, bare Exception()), the re-raised RuntimeError
rendered as '[AdapterName] ' with empty body.

Now falls back to '<ExceptionType: no message>' so operators can
tell what failed without inspecting __cause__.

Fixes langwatch#500
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.

scenario_executor re-raise renders empty body for no-message exceptions, hides root cause across all adapters

1 participant