Stack trace needs more details #325

Open
opened 2026-02-20 17:36:43 -05:00 by yindo · 1 comment
Owner

Originally created by @eyurtsev on GitHub (Nov 27, 2024).

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

The RemotException that's surfaced does not have enough information to identify where the error is / which state update fails (InvalidUpdateError)


---------------------------------------------------------------------------
RemoteException                           Traceback (most recent call last)
Cell In[1], line 38
     13 remote_graph = RemoteGraph(graph_name, url=url)
     15 schema = {
     16     "title": "People Name Extractor",
     17     "description": "Extracts names of people from text.",
   (...)
     35     },
     36 }
---> 38 value = remote_graph.invoke(
     39     {
     40         "url": "https://www.apple.com/leadership/",
     41         "json_schema": schema,
     42         "examples": [],
     43     }
     44 )

File ~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:772, in RemoteGraph.invoke(self, input, config, interrupt_before, interrupt_after)
    749 def invoke(
    750     self,
    751     input: Union[dict[str, Any], Any],
   (...)
    755     interrupt_after: Optional[Union[All, Sequence[str]]] = None,
    756 ) -> Union[dict[str, Any], Any]:
    757     """Create a run, wait until it finishes and return the final state.
    758 
    759     This method calls `POST [/threads/](http://localhost:8890/threads/){thread_id}[/runs/wait](http://localhost:8890/runs/wait)` if a `thread_id`
   (...)
    770         The output of the graph.
    771     """
--> 772     for chunk in self.stream(
    773         input,
    774         config=config,
    775         interrupt_before=interrupt_before,
    776         interrupt_after=interrupt_after,
    777         stream_mode="values",
    778     ):
    779         pass
    780     try:

File [~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:630](http://localhost:8890/home/eugene/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py#line=629), in RemoteGraph.stream(self, input, config, stream_mode, interrupt_before, interrupt_after, subgraphs)
    628         raise GraphInterrupt(chunk.data[INTERRUPT])
    629 elif chunk.event.startswith("error"):
--> 630     raise RemoteException(chunk.data)
    631 # filter for what was actually requested
    632 if mode not in requested:

RemoteException: {'error': 'InvalidUpdateError', 'message': "Expected node t
Originally created by @eyurtsev on GitHub (Nov 27, 2024). ### Privileged issue - [X] I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here. ### Issue Content The RemotException that's surfaced does not have enough information to identify where the error is / which state update fails (InvalidUpdateError) ```python --------------------------------------------------------------------------- RemoteException Traceback (most recent call last) Cell In[1], line 38 13 remote_graph = RemoteGraph(graph_name, url=url) 15 schema = { 16 "title": "People Name Extractor", 17 "description": "Extracts names of people from text.", (...) 35 }, 36 } ---> 38 value = remote_graph.invoke( 39 { 40 "url": "https://www.apple.com/leadership/", 41 "json_schema": schema, 42 "examples": [], 43 } 44 ) File ~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:772, in RemoteGraph.invoke(self, input, config, interrupt_before, interrupt_after) 749 def invoke( 750 self, 751 input: Union[dict[str, Any], Any], (...) 755 interrupt_after: Optional[Union[All, Sequence[str]]] = None, 756 ) -> Union[dict[str, Any], Any]: 757 """Create a run, wait until it finishes and return the final state. 758 759 This method calls `POST [/threads/](http://localhost:8890/threads/){thread_id}[/runs/wait](http://localhost:8890/runs/wait)` if a `thread_id` (...) 770 The output of the graph. 771 """ --> 772 for chunk in self.stream( 773 input, 774 config=config, 775 interrupt_before=interrupt_before, 776 interrupt_after=interrupt_after, 777 stream_mode="values", 778 ): 779 pass 780 try: File [~/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py:630](http://localhost:8890/home/eugene/.pyenv/versions/3.11.4/envs/graph_3_11_4/lib/python3.11/site-packages/langgraph/pregel/remote.py#line=629), in RemoteGraph.stream(self, input, config, stream_mode, interrupt_before, interrupt_after, subgraphs) 628 raise GraphInterrupt(chunk.data[INTERRUPT]) 629 elif chunk.event.startswith("error"): --> 630 raise RemoteException(chunk.data) 631 # filter for what was actually requested 632 if mode not in requested: RemoteException: {'error': 'InvalidUpdateError', 'message': "Expected node t ```
yindo added the enhancementmaintainer labels 2026-02-20 17:36:43 -05:00
Author
Owner

@anmol-aidora commented on GitHub (Dec 26, 2024):

I agree. There should be an option to pass whole exception stacktrace in RemoteException

@anmol-aidora commented on GitHub (Dec 26, 2024): I agree. There should be an option to pass whole exception stacktrace in RemoteException
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#325