Skip to content

Improve exception tracebacks for easier debugging #1744

@maxisbey

Description

@maxisbey

Summary

Make exception tracebacks clearer and easier to understand by reducing asyncio/anyio wrapper noise.

Problem

  • Exceptions are often wrapped in multiple layers of asyncio/anyio task group machinery
  • Tracebacks are hard to read and don't clearly point to the root cause
  • The raise_exception flag is not consistently respected
  • Errors from deep inside task groups obscure the actual failure point

Goal

  • Cleaner tracebacks that point to user code, not SDK internals
  • Raise exceptions from the main context where possible
  • Reduce nesting of exception wrappers

Related


AI Disclaimer

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions