aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Controllers
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-15 20:12:38 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-15 20:12:38 +0200
commit4adc2aecc81961430c7d73ff658b535a75e7685b (patch)
treee4eb70693b9f7be64385950ef144a64c7011a783 /src/DevHive.Web/Controllers
parent2a1dc627f7c5b32610e97e1146ab17143c880504 (diff)
downloadDevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.tar
DevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.tar.gz
DevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.zip
Fixed ErrorController
Diffstat (limited to 'src/DevHive.Web/Controllers')
-rw-r--r--src/DevHive.Web/Controllers/ErrorController.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DevHive.Web/Controllers/ErrorController.cs b/src/DevHive.Web/Controllers/ErrorController.cs
index e84c19a..f4c61ec 100644
--- a/src/DevHive.Web/Controllers/ErrorController.cs
+++ b/src/DevHive.Web/Controllers/ErrorController.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Net;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
@@ -10,9 +8,10 @@ namespace DevHive.Web.Controllers
public class ErrorController
{
[HttpGet]
- public HttpStatusCode Error(HttpRequestException exception)
- {
- return BadRequest(exception)
+ public IActionResult Error(HttpRequestException exception)
+ {
+ return new BadRequestObjectResult(exception);
}
}
}
+