public IActionResult RunProject(string projectName) { _logger.LogInformation("Starting RunProject() for '{0}'", projectName); JsonResult jsonResult; try { (RunnerResult result, string name) = _runner.CreateProjectInstance(projectName); jsonResult = HandleResult(name, result); } catch (Exception ex) { jsonResult = new JsonResult(ex.Message); jsonResult.StatusCode = StatusCodes.Status500InternalServerError; } _logger.LogInformation("Response: {0}", JsonSerializer.Serialize(jsonResult)); return(jsonResult); }