diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Web')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs index 0f69bf570..deaa7cf48 100644 --- a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs +++ b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs @@ -60,7 +60,6 @@ namespace Tango.Web.Controllers LogManager.Log(ex, $"An error occurred while processing the request message on {controllerName + "/" + actionName}."); HttpStatusCode code = HttpStatusCode.InternalServerError; - HttpResponseException httpException = null; if (ex is ArgumentException || ex is InvalidDataException) { @@ -74,7 +73,10 @@ namespace Tango.Web.Controllers { code = HttpStatusCode.NotFound; } - else if (ex is HttpResponseException httpResponseException) + + HttpResponseException httpException = null; + + if (ex is HttpResponseException httpResponseException) { httpException = httpResponseException; } |
