mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-26 23:57:35 +08:00
Merge branch 'develop'
This commit is contained in:
commit
1ea107d316
@ -45,7 +45,6 @@ public static class ProblemDetailsExtensions
|
||||
|
||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||
{
|
||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||
var exceptionType = exceptionHandlerFeature?.Error;
|
||||
|
||||
@ -114,7 +113,7 @@ public static class ProblemDetailsExtensions
|
||||
}
|
||||
};
|
||||
|
||||
if (env.IsDevelopment())
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||
}
|
||||
|
||||
@ -35,7 +35,6 @@ public static class ProblemDetailsExtensions
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
app.UseExceptionHandler(exceptionHandlerApp =>
|
||||
@ -46,7 +45,6 @@ public static class ProblemDetailsExtensions
|
||||
|
||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||
{
|
||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||
var exceptionType = exceptionHandlerFeature?.Error;
|
||||
|
||||
@ -115,7 +113,7 @@ public static class ProblemDetailsExtensions
|
||||
}
|
||||
};
|
||||
|
||||
if (env.IsDevelopment())
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||
}
|
||||
|
||||
@ -45,7 +45,6 @@ public static class ProblemDetailsExtensions
|
||||
|
||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||
{
|
||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||
var exceptionType = exceptionHandlerFeature?.Error;
|
||||
|
||||
@ -114,7 +113,7 @@ public static class ProblemDetailsExtensions
|
||||
}
|
||||
};
|
||||
|
||||
if (env.IsDevelopment())
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||
}
|
||||
|
||||
@ -45,7 +45,6 @@ public static class ProblemDetailsExtensions
|
||||
|
||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||
{
|
||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||
var exceptionType = exceptionHandlerFeature?.Error;
|
||||
|
||||
@ -114,7 +113,7 @@ public static class ProblemDetailsExtensions
|
||||
}
|
||||
};
|
||||
|
||||
if (env.IsDevelopment())
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user