[PR #1635] [Feature] Add onerror cb for submit #1605

Open
opened 2026-02-15 20:16:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1635
Author: @hieusmiths
Created: 9/10/2025
Status: 🔄 Open

Base: mainHead: feat/add-onerr-for-submit


📝 Commits (1)

  • aa52219 feat: add onerror cb for submit

📊 Changes

2 files changed (+2 additions, -0 deletions)

View changed files

📝 libs/sdk/src/react/stream.tsx (+1 -0)
📝 libs/sdk/src/react/types.tsx (+1 -0)

📄 Description

Current Situation:
We are currently using the onError callback within useStream to handle all errors. However, this approach seems too generic and is primarily suitable for logging purposes rather than robust error handling.

Problem:
The generic error handling is not sufficient for user-facing scenarios where specific error conditions require particular user actions, such as retrying an operation.

Sample Use Case:

  • A user submits a request to initiate a stream.
  • The stream operation fails.
  • The application needs to display a specific error message to the user, along with an option to retry the operation.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/1635 **Author:** [@hieusmiths](https://github.com/hieusmiths) **Created:** 9/10/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/add-onerr-for-submit` --- ### 📝 Commits (1) - [`aa52219`](https://github.com/langchain-ai/langgraphjs/commit/aa52219e5a6a9488723651cfe2d763a5cbc53948) feat: add onerror cb for submit ### 📊 Changes **2 files changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `libs/sdk/src/react/stream.tsx` (+1 -0) 📝 `libs/sdk/src/react/types.tsx` (+1 -0) </details> ### 📄 Description <!-- Thank you for contributing to LangGraph.js! Your PR will appear in our next release under the title you set above. Please make sure it highlights your valuable contribution. To help streamline the review process, please make sure you read our contribution guidelines: https://github.com/langchain-ai/langgraphjs/blob/main/CONTRIBUTING.md Replace this block with a description of the change, the issue it fixes (if applicable), and relevant context. Finally, we'd love to show appreciation for your contribution - if you'd like us to shout you out on Twitter, please also include your handle below! --> <!-- Remove if not applicable --> Current Situation: We are currently using the onError callback within useStream to handle all errors. However, this approach seems too generic and is primarily suitable for logging purposes rather than robust error handling. Problem: The generic error handling is not sufficient for user-facing scenarios where specific error conditions require particular user actions, such as retrying an operation. Sample Use Case: - A user submits a request to initiate a stream. - The stream operation fails. - The application needs to display a specific error message to the user, along with an option to retry the operation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:16:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#1605