error handling

General method for error handling

if(env.IsDevelopment()){
	app.UseDeveloperExceptionPage();
} else {
	app.UseExceptionHandler("/Error");
	app.UseHsts();
}