Skip to content

Set response statuses in HttpResponse.OnStarting? #2375

@ravindUwU

Description

@ravindUwU

Confirm you've already contributed to this project or that you sponsor it

  • I confirm I'm a sponsor or a contributor

Describe the solution you'd like

Hello! 😊
ASP.NET Core doesn't seem to run minimal API request delegates if middleware sets an error status code before minimal API filters run: dotnet/aspnetcore#60659. This becomes problematic when OpenIddict server is configured to passthrough errors to be handled by a minimal API endpoint.

Setting the status code in the HttpResponse.OnStarting callback however, seems fine: dotnet/aspnetcore#60659 (comment). Could OpenIddict set response status codes this way 🤔?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions