mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-05-02 19:02:55 +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)
|
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||||
{
|
{
|
||||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
|
||||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||||
var exceptionType = exceptionHandlerFeature?.Error;
|
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());
|
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,6 @@ public static class ProblemDetailsExtensions
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
app.UseExceptionHandler(exceptionHandlerApp =>
|
app.UseExceptionHandler(exceptionHandlerApp =>
|
||||||
@ -46,7 +45,6 @@ public static class ProblemDetailsExtensions
|
|||||||
|
|
||||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||||
{
|
{
|
||||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
|
||||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||||
var exceptionType = exceptionHandlerFeature?.Error;
|
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());
|
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,6 @@ public static class ProblemDetailsExtensions
|
|||||||
|
|
||||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||||
{
|
{
|
||||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
|
||||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||||
var exceptionType = exceptionHandlerFeature?.Error;
|
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());
|
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,6 @@ public static class ProblemDetailsExtensions
|
|||||||
|
|
||||||
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
if (context.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
|
||||||
{
|
{
|
||||||
var env = context.RequestServices.GetRequiredService<IWebHostEnvironment>();
|
|
||||||
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
var exceptionHandlerFeature = context.Features.Get<IExceptionHandlerFeature>();
|
||||||
var exceptionType = exceptionHandlerFeature?.Error;
|
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());
|
problem.ProblemDetails.Extensions.Add("exception", exceptionHandlerFeature?.Error.ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user