feat: keep internal error in worker's quit reason#372
Merged
4t145 merged 4 commits intomodelcontextprotocol:mainfrom Aug 18, 2025
Merged
feat: keep internal error in worker's quit reason#3724t145 merged 4 commits intomodelcontextprotocol:mainfrom
4t145 merged 4 commits intomodelcontextprotocol:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
WorkerQuitReasongeneric 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
StreamableHttpErrorenum variants (Sever→Server)
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Just adopted copilot's suggestion. |
jokemanfire
approved these changes
Aug 16, 2025
Merged
takumi-earth
pushed a commit
to earthlings-dev/rmcp
that referenced
this pull request
Jan 27, 2026
…ol#372) * feat: support downcast WorkerQuitReason::Fatal * feat(transport): expose internal worker error in fatal * Update crates/rmcp/src/transport/streamable_http_client.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update crates/rmcp/src/transport/streamable_http_client.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
fix #345
Motivation and Context
How Has This Been Tested?
Breaking Changes
QuitReasonStreamableHttpErrorTypes of changes
Checklist
Additional context