From 90e0126d4078b5fef44b085b34caf7a35161ff50 Mon Sep 17 00:00:00 2001 From: transtrike Date: Tue, 19 Jan 2021 21:12:49 +0200 Subject: Added Custom Middleware for Exception Handling --- src/DevHive.Web/Startup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/DevHive.Web/Startup.cs') diff --git a/src/DevHive.Web/Startup.cs b/src/DevHive.Web/Startup.cs index 94aabe8..4e55873 100644 --- a/src/DevHive.Web/Startup.cs +++ b/src/DevHive.Web/Startup.cs @@ -33,6 +33,7 @@ namespace DevHive.Web services.JWTConfiguration(Configuration); services.AutoMapperConfiguration(); services.DependencyInjectionConfiguration(); + services.CustomMiddlewareConfiguration(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -47,7 +48,6 @@ namespace DevHive.Web if (env.IsDevelopment()) { //app.UseDeveloperExceptionPage(); - app.UseExceptionHandler("/api/Error"); app.UseSwaggerConfiguration(); } else @@ -58,6 +58,7 @@ namespace DevHive.Web app.UseDatabaseConfiguration(); app.UseAutoMapperConfiguration(); + app.UseCustomMiddlewareConfiguration(); app.UseEndpoints(endpoints => { -- cgit v1.2.3