You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidOperationException: The EndpointRoutingMiddleware and EndpointMiddleware must be added to the same IApplicationBuilder instance. To use Endpoint Routing with 'Map(...)', make sure to call 'IApplicationBuilder.UseRouting' before 'IApplicationBuilder.UseEndpoints' for each branch of the middleware pipeline.
This is due to app being a SentryTracingBuilder but app.UseRouting() returning the default ApplicationBuilder which is normally wrapped in SentryTracingBuilder.
I'm not understanding every impact of this but maybe the Use method in SentryTracingBuilder should return itself in all case to avoid that ?
Expected Result
No crash
Actual Result
Exception above
The text was updated successfully, but these errors were encountered:
Package
Sentry.AspNetCore
.NET Flavor
.NET
.NET Version
7.0.12
OS
Any (not platform specific)
SDK Version
3.40.0 & 3.40.1
Self-Hosted Sentry Version
No response
Steps to Reproduce
Made a small repo for repro here : https://github.com/Julien-Mialon/SentryRoutingEndpointIssue/
But basically, create an AspNet API project, add Sentry, use this line of code in Startup Configure method
And it will crash with exception :
This is due to app being a SentryTracingBuilder but app.UseRouting() returning the default ApplicationBuilder which is normally wrapped in SentryTracingBuilder.
I'm not understanding every impact of this but maybe the Use method in SentryTracingBuilder should return itself in all case to avoid that ?
Expected Result
No crash
Actual Result
Exception above
The text was updated successfully, but these errors were encountered: