aboutsummaryrefslogtreecommitdiff
path: root/API
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2020-12-10 19:18:16 +0200
committertranstrike <transtrike@gmail.com>2020-12-10 19:18:16 +0200
commitf8dd04620150c2806169c881c8537dc623a0f463 (patch)
tree408f72da2db74a5c410e7cc30d3a01d6ddc60221 /API
parentc57a333078cdaec29f70b033f95f408d82eac4bc (diff)
downloadDevHive-f8dd04620150c2806169c881c8537dc623a0f463.tar
DevHive-f8dd04620150c2806169c881c8537dc623a0f463.tar.gz
DevHive-f8dd04620150c2806169c881c8537dc623a0f463.zip
Starting to implement Error Controller
Diffstat (limited to 'API')
-rw-r--r--API/Controllers/ErrorController.cs4
-rw-r--r--API/Startup.cs2
2 files changed, 3 insertions, 3 deletions
diff --git a/API/Controllers/ErrorController.cs b/API/Controllers/ErrorController.cs
index 4c5d9ef..6757804 100644
--- a/API/Controllers/ErrorController.cs
+++ b/API/Controllers/ErrorController.cs
@@ -2,10 +2,10 @@ using System;
namespace API.Controllers
{
+ [ApiController]
public class ErrorController
{
- //FIXME: SHOULD NOT BE VOID
- public void Error(Exception exception)
+ public HttpStatusCode Error(Exception exception)
{
}
diff --git a/API/Startup.cs b/API/Startup.cs
index dbe8fdd..399feca 100644
--- a/API/Startup.cs
+++ b/API/Startup.cs
@@ -63,7 +63,7 @@ namespace API
}
else
{
- app.UseExceptionHandler();
+ app.UseExceptionHandler("/Error");
}
app.UseHttpsRedirection();