Skip to content

Endpoint routing failures are cached #43693

Closed
@davidfowl

Description

@davidfowl

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When an EndpointDataSources throws an exception while building endpoints the exception is observed once on the first request and subsequent requests end up 404-ing.

Expected Behavior

The exception should be thrown every time.

Steps To Reproduce

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", () => "Hello World!"u8);

app.Run();

Exceptions (if any)

An exception and then a 404 on the second request.

.NET Version

7.0.100-rc.2.22426.5

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugThis issue describes a behavior which is not expected - a bug.feature-routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions