Skip to content

Commit 42d63f8

Browse files
committed
Merge branch 'master' of github.com:nanotaboada/Dotnet.Samples.AspNetCore.WebApi into feature/seed-substitute-players
2 parents f0e934d + 33d017f commit 42d63f8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Dotnet.Samples.AspNetCore.WebApi/Middlewares/ExceptionMiddleware.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ namespace Dotnet.Samples.AspNetCore.WebApi.Middlewares;
88
/// <summary>
99
/// Middleware for global exception handling with RFC 7807 Problem Details format.
1010
/// </summary>
11-
public class ExceptionMiddleware(ILogger<ExceptionMiddleware> logger, IHostEnvironment environment)
11+
public class ExceptionMiddleware(
12+
RequestDelegate next,
13+
ILogger<ExceptionMiddleware> logger,
14+
IHostEnvironment environment
15+
)
1216
{
1317
private const string ProblemDetailsContentType = "application/problem+json";
1418

@@ -18,7 +22,7 @@ public class ExceptionMiddleware(ILogger<ExceptionMiddleware> logger, IHostEnvir
1822
/// <summary>
1923
/// Invokes the middleware to handle exceptions globally.
2024
/// </summary>
21-
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
25+
public async Task InvokeAsync(HttpContext context)
2226
{
2327
try
2428
{

0 commit comments

Comments
 (0)