mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Catch real errors !wip
This commit is contained in:
parent
46ab1ad923
commit
b573bc30f5
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@ namespace Ombi
|
|||
|
||||
private static Task HandleExceptionAsync(HttpContext context, Exception exception)
|
||||
{
|
||||
var logger = context.RequestServices.GetService<ILogger>();
|
||||
var loggerFact = context.RequestServices.GetService<ILoggerFactory>();
|
||||
var logger = loggerFact.CreateLogger<ErrorHandlingMiddleware>();
|
||||
logger.LogError(exception, "Something bad happened, ErrorMiddleware caught this");
|
||||
var code = HttpStatusCode.InternalServerError; // 500 if unexpected
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue