How to make custom error handling in ASP.NET Core 2.0