Generic Exception Handler
app.UseExceptionHandler(appBuilder =>
{
appBuilder.Run(async context =>
{
context.Response.Headers.Add("Access-Control-Allow-Origin", "*"); // I needed to add this otherwise in Angular I Would get "Response with status: 0 for URL"
context.Response.StatusCode = 500;
await context.Response.WriteAsync("Internal Server Error");
});
});