fix(dir): 🐛 resolve CS8602 warnings

This commit is contained in:
Collin M. Barrett 2021-11-11 08:16:46 -06:00
parent 75327b7804
commit 2a8fcde98c
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ public IActionResult ErrorLocalDevelopment([FromServices] IWebHostEnvironment we
}
var context = HttpContext.Features.Get<IExceptionHandlerFeature>();
return Problem(context.Error.StackTrace, title: context.Error.Message);
return Problem(context?.Error.StackTrace, title: context?.Error.Message);
}
[Route("/error")]

View file

@ -19,7 +19,7 @@ public IActionResult ErrorLocalDevelopment([FromServices] IWebHostEnvironment we
}
var context = HttpContext.Features.Get<IExceptionHandlerFeature>();
return Problem(context.Error.StackTrace, title: context.Error.Message);
return Problem(context?.Error.StackTrace, title: context?.Error.Message);
}
[Route("/error")]