Custom filters
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- backend-api-design
Research direction
Start by reviewing the AddMcpServer options entry point and how cancellation exceptions are currently handled in the server pipeline. Define how a custom OperationCancelledExceptionFilter can be registered there and verify that cancellation is handled gracefully without producing the current error.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Cancellation token is throwing error which can be handled graceful way like described here
https://andrewlock.net/using-cancellationtokens-in-asp-net-core-mvc-controllers/
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc(options =>
{
options.Filters.Add<OperationCancelledExceptionFilter>();
});
}
}
Describe the solution you'd like
It would be nice to add custom filter
builder.Services.AddMcpServer(options =>
{
options.Filters.Add<OperationCancelledExceptionFilter>();
})
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 3
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/csharp-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/csharp-sdk#1867 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/csharp-sdk#1836 ·
Maintainers usually reply within 2 days
-
enhancement needs confirmation
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement needs confirmation P3 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/csharp-sdk#515 · 6 comments · 3 reactions ·
Maintainers usually reply within 2 days
All issues in modelcontextprotocol/csharp-sdk
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fluentassertions/fluentassertions#3353 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
unoplatform/uno#24769 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AvaloniaUI/Avalonia#22323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/onnxruntime-genai#2633 ·
Maintainers usually reply within 1 day