Viewer to Server
This commit is contained in:
@ -15,7 +15,7 @@ public class ErrorHandlerController : Controller
|
||||
public IActionResult Index()
|
||||
{
|
||||
IExceptionHandlerFeature error = HttpContext.Features.Get<IExceptionHandlerFeature>();
|
||||
if (error == null)
|
||||
if (error is null)
|
||||
{
|
||||
return Redirect("~/");
|
||||
}
|
||||
@ -24,7 +24,7 @@ public class ErrorHandlerController : Controller
|
||||
_Logger.LogError("Unhandled exception: " + error.Error.ToString());
|
||||
dynamic r = new
|
||||
{
|
||||
Message = error.Error == null ? "Error" : error.Error.Message
|
||||
Message = error.Error is null ? "Error" : error.Error.Message
|
||||
};
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, r);
|
||||
}
|
||||
|
Reference in New Issue
Block a user