Skip to content

feat: keep internal error in worker's quit reason #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

4t145
Copy link
Collaborator

@4t145 4t145 commented Aug 13, 2025

fix #345

Motivation and Context

How Has This Been Tested?

Breaking Changes

  1. Change the error type for local session worker.
  2. Change the type defination of worker's QuitReason
  3. Fix some typo of StreamableHttpError

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@github-actions github-actions bot added T-core Core library changes T-transport Transport layer changes labels Aug 13, 2025
@4t145 4t145 requested a review from Copilot August 15, 2025 03:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances error handling in the transport worker system by making the WorkerQuitReason generic over error types, allowing workers to preserve their specific error types rather than converting them to strings. It also fixes spelling errors in StreamableHttpError variants.

Key changes:

  • Made WorkerQuitReason generic over error types to preserve internal error information
  • Updated all worker implementations to use specific error types instead of generic string errors
  • Fixed typos in StreamableHttpError enum variants (SeverServer)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
crates/rmcp/src/transport/worker.rs Made WorkerQuitReason generic over error type E and updated method signatures
crates/rmcp/src/transport/streamable_http_server/session/local.rs Introduced LocalSessionWorkerError enum and updated worker implementation to use specific error types
crates/rmcp/src/transport/streamable_http_client.rs Fixed spelling errors and updated to use generic error types in method calls
crates/rmcp/src/transport/common/reqwest/streamable_http_client.rs Fixed spelling error in error variant name

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@4t145 4t145 requested a review from jokemanfire August 15, 2025 03:26
jokemanfire
jokemanfire previously approved these changes Aug 15, 2025
Copy link
Collaborator

@jokemanfire jokemanfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@4t145 4t145 requested a review from jokemanfire August 15, 2025 06:55
@4t145
Copy link
Collaborator Author

4t145 commented Aug 15, 2025

Just adopted copilot's suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-core Core library changes T-transport Transport layer changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose client errors to call
2 participants