You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Enhance error handling in MCP client and server for OAuth authentication
- Implemented comprehensive error classification for OAuth-related issues in the MCPProxyServer and Client.
- Refactored error handling to provide user-friendly messages and recovery instructions for various OAuth scenarios.
- Added safety checks and logging enhancements during Dynamic Client Registration to improve robustness and traceability.
* Enhance OAuth error handling and logging in client connection
- Improved validation and diagnostics for OAuth handler state before proceeding with Dynamic Client Registration.
- Added detailed logging for metadata investigation and potential OAuth endpoints.
- Enhanced error classification and user-friendly messages for various OAuth scenarios, including unsupported DCR and metadata unavailability.
- Implemented cleanup and recovery instructions to guide users through OAuth setup failures.
* Enhance error handling and logging for tool calls in MCPProxyServer and Client
- Improved error messages with enriched context for OAuth-related issues, connection errors, and permission denials.
- Refactored error handling in CallTool methods to provide clearer guidance and recovery instructions.
- Removed deprecated error classification function to streamline code and improve maintainability.
// Provide clear error messages based on error type
433
-
varerrorMsgstring
434
-
ifstrings.Contains(err.Error(), "no connected client found") {
435
-
errorMsg=fmt.Sprintf("Server '%s' does not exist or is not configured. Available proxy tools: upstream_servers, retrieve_tools, read_cache, call_tool. Use 'upstream_servers' with operation 'list' to see configured upstream servers.", serverName)
436
-
} elseifstrings.Contains(err.Error(), "client for server") &&strings.Contains(err.Error(), "is not connected") {
437
-
errorMsg=fmt.Sprintf("Server '%s' is currently disconnected or in connecting state. Check server configuration and connectivity.", serverName)
438
-
} elseifstrings.Contains(err.Error(), "client not connected") {
439
-
errorMsg=fmt.Sprintf("Server '%s' is not connected. The server may be starting up, experiencing connection issues, or may be misconfigured.", serverName)
440
-
} else {
441
-
errorMsg=fmt.Sprintf("Tool call to '%s:%s' failed: %v", serverName, actualToolName, err)
0 commit comments