Handle any exceptions when fetching the data for the tree view.