public IActionResult GetStructureById(int id) { StructureDetails response = null; try { response = _structureService.GetStructureById(id); return(Ok(response)); } catch (Exception e) { Util.LogError(e); return(StatusCode(StatusCodes.Status500InternalServerError, new ErrorClass() { code = StatusCodes.Status500InternalServerError.ToString(), message = "Something went wrong" })); } finally { Util.LogInfo($"GetStructureById: {id}"); } }