Skip to content

Custom filters #1314

@herbat73

Description

@herbat73

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to haves, rare edge casesenhancementNew feature or requestready for workHas enough information to start

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions