Skip to content

fix: 4 additional raise sites missing exception chaining with 'from' #2575

@siddhirajkatkar

Description

@siddhirajkatkar

Follow-up to #2564 which fixed 12 sites. After reviewing the codebase,
I found 4 additional sites that were missed.

Sites

File Line Fix
server/mcpserver/resources/templates.py 133 add from e
shared/experimental/tasks/in_memory_task_store.py 172 add from None
server/mcpserver/prompts/base.py 184 add from None
server/mcpserver/prompts/base.py 189 add from e

Impact

Same as #2564 — without from, Python shows
"During handling of the above exception, another exception occurred"
instead of "The above exception was the direct cause".
Callers cannot inspect __cause__ programmatically.

I have a PR ready for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions