Skip to content

Keep the original error when join() rejects a suffix - #117

Merged
stefankoegl merged 1 commit into
claude/pensive-wright-ioey78from
claude/join-exception-chain
Nov 11, 2026
Merged

stefankoegl merged 1 commit into
claude/pensive-wright-ioey78from
claude/join-exception-chain

Conversation

@stefankoegl

Copy link
Copy Markdown
Owner

Stacked on #114. Once that merges, retarget this to master.

JsonPointer.join() turns any failure into JsonPointerException("Invalid suffix") and drops the original error. It now raises from e, so the cause (for example a TypeError for a non-iterable suffix) shows up in tracebacks and is available as __cause__. The exception type and message are unchanged.

A new test checks __cause__. python -m unittest and flake8 pass.


Generated by Claude Code

join() turns any failure into JsonPointerException("Invalid suffix").
Raise it "from" the original exception so the underlying cause (e.g. a
TypeError for a non-iterable suffix) shows up in tracebacks and is
available as __cause__.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PewzpjhRBV84QNbKy9H564
@stefankoegl
stefankoegl merged commit a4b3fb4 into claude/pensive-wright-ioey78 Nov 11, 2026
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.

2 participants