diff options
| -rw-r--r-- | src/DevHive.Web/Controllers/ErrorController.cs | 8 | ||||
| -rw-r--r-- | src/DevHive.Web/Startup.cs | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/DevHive.Web/Controllers/ErrorController.cs b/src/DevHive.Web/Controllers/ErrorController.cs index 560b0da..e84c19a 100644 --- a/src/DevHive.Web/Controllers/ErrorController.cs +++ b/src/DevHive.Web/Controllers/ErrorController.cs @@ -10,11 +10,9 @@ namespace DevHive.Web.Controllers public class ErrorController { [HttpGet] - public HttpStatusCode HttpError(HttpRequestException exception) - { - Console.WriteLine("WE HERE, BOIIIIIII"); - - return HttpStatusCode.OK; + public HttpStatusCode Error(HttpRequestException exception) + { + return BadRequest(exception) } } } diff --git a/src/DevHive.Web/Startup.cs b/src/DevHive.Web/Startup.cs index c7e2bb3..104ba4a 100644 --- a/src/DevHive.Web/Startup.cs +++ b/src/DevHive.Web/Startup.cs @@ -34,7 +34,8 @@ namespace DevHive.Web {
if (env.IsDevelopment())
{
- app.UseDeveloperExceptionPage();
+ //app.UseDeveloperExceptionPage();
+ app.UseExceptionHandler("/api/Error");
//app.UseExceptionHandler("/api/HttpError");
app.UseSwaggerConfiguration();
}
|
