Title: fix: Add an exception handling function to WebFluxSseClientTransport by YunKuiLu · Pull Request #223 · modelcontextprotocol/java-sdk · GitHub
Open Graph Title: fix: Add an exception handling function to WebFluxSseClientTransport by YunKuiLu · Pull Request #223 · modelcontextprotocol/java-sdk
X Title: fix: Add an exception handling function to WebFluxSseClientTransport by YunKuiLu · Pull Request #223 · modelcontextprotocol/java-sdk
Description: sseErrorHandler is used to handle errors when processing SSE events and situations where an unrecognized event type is received. Add unit tests to verify. Motivation and Context Users can use custom handlers when they encounter the following exceptions: #93 spring-projects/spring-ai#2936 All other clients are compatible with this, but the WebFlux client throws an exception, which is necessary to fix. Although the MCP protocol does not allow any message types other than JSON-PRC, users should have a way to handle it instead of having the client stop. Therefore, I did not attempt to ignore it. Instead, I simply made it clearly visible in the log without interrupting the connection. How Has This Been Tested? Breaking Changes I've provided a default error handler that prints the exception. User can also override it with the set method. 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 Since I added a new field to catch exceptions, I need Member to confirm that the design conforms to the future path of Mcp Java Sdk. Thus avoiding the introduction of an AD hoc solution.
Open Graph Description: sseErrorHandler is used to handle errors when processing SSE events and situations where an unrecognized event type is received. Add unit tests to verify. Motivation and Context Users can use cust...
X Description: sseErrorHandler is used to handle errors when processing SSE events and situations where an unrecognized event type is received. Add unit tests to verify. Motivation and Context Users can use cust...
Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/pull/223
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7fea3a22-9de9-9a96-1032-07711e434e46 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA90:1C23F8:483386C:636FA71:6A5E1F0B |
| html-safe-nonce | b3d196db6d354b978497bcb723729e5ebf89cda8ba8422e84996cbef13ddf969 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTkwOjFDMjNGODo0ODMzODZDOjYzNkZBNzE6NkE1RTFGMEIiLCJ2aXNpdG9yX2lkIjoiMjg4OTIzODUxNjI4MjA0MDA3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cf7b59cacc3ce637f8a34e558a5abdc98222b5e4148a88f23f05a86761a2c3eb |
| hovercard-subject-tag | pull_request:2503837774 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/java-sdk/pull/223/files |
| twitter:image | https://avatars.githubusercontent.com/u/187591080?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/187591080?s=400&v=4 |
| og:image:alt | sseErrorHandler is used to handle errors when processing SSE events and situations where an unrecognized event type is received. Add unit tests to verify. Motivation and Context Users can use cust... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7a60e060dad2c24f72179d36247204b454da37845d1728020cd42046a433f87f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 919609219 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 919609219 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0ae7f3ea7b1bb2f1f4623bb093bbf54cee05d830 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width