-
Notifications
You must be signed in to change notification settings - Fork 461
Fix/log blocked chan #216
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
base: main
Are you sure you want to change the base?
Fix/log blocked chan #216
Conversation
WalkthroughThe update moves session management and notification sending methods from Changes
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
maybe you could wrap the error as |
Thank you for the explanation. I’ve applied it to my code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, thanks for working on it!
Would you mind rebasing? It would be great to also have a test case for this, but that might be kinda tricky so just let me know...
@frinfo702 - Mind fixing up the conflicts? |
4c2a6ec
to
7a398a9
Compare
Hi @robert-jackson-glean, I’ve rebased Could you please take another look when you have a moment? Thanks for your time! |
I noticed that the same functionality has already been merged in a different PR, including tests and proper integration. Thanks for reviewing — happy to contribute further in other areas. |
This pull request introduces error handling improvements for blocked notification channels and includes a minor cleanup in the
server/server.go
file. The most significant changes enhance logging and error reporting when notification channels are blocked.Error handling improvements:
func (s *MCPServer) SendNotificationToAllClients
: Added logic to log an error usings.hooks.onError
when a notification channel is blocked, including the session ID and method name in the error message.func (s *MCPServer) SendNotificationToClient
: Enhanced error reporting by logging blocked notification channels withs.hooks.onError
, providing session ID and method details, and returning a descriptive error message.Code cleanup:
func (s *MCPServer) AddResourceTemplate
: Removed an unnecessary blank line for minor code cleanup.Summary by CodeRabbit