private NodeStructure PrimeViewBag(string path, bool showDeleted = false, int?revision = null) { var structure = _nodeProvider.GetStructure(path, showDeleted, revision); try { structure.CheckPath(); } catch (InvalidPathWarning warn) { ModelState.AddModelError("Warning", warn.Message); } catch (InvalidPathError) { ModelState.AddModelError("Error", "Error: The path you tried to access is ambiguous or does not exist. Currently showing deepest working node."); } ViewBag.Structure = structure; ViewBag.ShowDeleted = showDeleted; return(structure); }