diff options
| author | Danail Dimitrov <danaildimitrov321@gmail.com> | 2020-12-15 20:12:38 +0200 |
|---|---|---|
| committer | Danail Dimitrov <danaildimitrov321@gmail.com> | 2020-12-15 20:12:38 +0200 |
| commit | 4adc2aecc81961430c7d73ff658b535a75e7685b (patch) | |
| tree | e4eb70693b9f7be64385950ef144a64c7011a783 | |
| parent | 2a1dc627f7c5b32610e97e1146ab17143c880504 (diff) | |
| download | DevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.tar DevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.tar.gz DevHive-4adc2aecc81961430c7d73ff658b535a75e7685b.zip | |
Fixed ErrorController
| -rw-r--r-- | src/DevHive.Web/Controllers/ErrorController.cs | 9 |
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); } } } + |
