aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Controllers
diff options
context:
space:
mode:
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);
}
}
}
+