Commit b13f8f3
committed
fix: chain exceptions in get_prompt and read_resource handlers
Two raise statements discarded the causal exception chain:
- Line 1112: raise ValueError(str(e)) → raise ValueError(str(e)) from e
- Line 451: raise ResourceError(...) → raise ResourceError(...) from exc
The same file already uses `from exc` correctly at line 459.
Without `from`, callers lose the original traceback and cannot
programmatically inspect the root cause via __cause__.
Fixes #25411 parent 3d7b311 commit b13f8f3
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
| 450 | + | |
| 451 | + | |
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
1112 | | - | |
| 1112 | + | |
0 commit comments