-
Notifications
You must be signed in to change notification settings - Fork 574
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
The McpProtocolException class doesn't support data. I'm trying to add the uri to the Resource not found error, as shown here.
Describe the solution you'd like
Add another exception parameter, or pass along Exception.Data.
Describe alternatives you've considered
I tried using Exception.Data, but it's not persisted.
throw new McpProtocolException(
ReadResourceHandler_ResourceNotFound,
(McpErrorCode)(-32002))
{
Data =
{
{ "uri", context.Params!.Uri }
}
};Additional context
See also #863.
Copilot
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request