fix(langgraph): Ignore GraphBubbleUp exceptions#6608
Open
alexander-alderman-webb wants to merge 2 commits into
Open
fix(langgraph): Ignore GraphBubbleUp exceptions#6608alexander-alderman-webb wants to merge 2 commits into
GraphBubbleUp exceptions#6608alexander-alderman-webb wants to merge 2 commits into
Conversation
Contributor
Codecov Results 📊✅ 90832 passed | ⏭️ 6129 skipped | Total: 96961 | Pass Rate: 93.68% | Execution Time: 331m 52s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2404 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.85% 89.88% +0.03%
==========================================
Files 192 192 —
Lines 23745 23752 +7
Branches 8198 8200 +2
==========================================
+ Hits 21334 21348 +14
- Misses 2411 2404 -7
- Partials 1344 1344 —Generated by Codecov Action |
ericapisani
approved these changes
Jun 19, 2026
| self._exit_span(span, run_id) | ||
|
|
||
| def _handle_error(self, run_id: "UUID", error: "Any") -> None: | ||
| is_ignored = isinstance(error, tuple(LangchainIntegration._ignored_exceptions)) |
Member
There was a problem hiding this comment.
While this achieves what we want, a more concise way that this can be written is:
Suggested change
| is_ignored = isinstance(error, tuple(LangchainIntegration._ignored_exceptions)) | |
| is_ignored = type(error) in LangchainIntegration._ignored_exceptions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Close the active span without setting an error status and do not capture an exception if
GraphBubbleUpis handled. The exception is a LangGraph control-flow type.Since the error hooks live on the LangChain layer, add a private set that the LangGraph integration uses to inform the LangChain integration that
GraphBubbleUpshould be ignored. This prevents semantics from the LangGraph library leaking into the LangChain integration.Issues
Closes #6384
Reminders
uv run ruff.feat:,fix:,ref:,meta:)