##// END OF EJS Templates
files: protect against 500 errors on nodelist.
marcink -
r2152:8e19a416 default
parent child Browse files
Show More
@@ -789,11 +789,19 b' class RepoFilesView(RepoAppView):'
789 def _cached_nodes():
789 def _cached_nodes():
790 log.debug('Generating cached nodelist for %s, %s, %s',
790 log.debug('Generating cached nodelist for %s, %s, %s',
791 repo_name, commit_id, f_path)
791 repo_name, commit_id, f_path)
792 _d, _f = ScmModel().get_nodes(
792 try:
793 repo_name, commit_id, f_path, flat=False)
793 _d, _f = ScmModel().get_nodes(
794 repo_name, commit_id, f_path, flat=False)
795 except (RepositoryError, CommitDoesNotExistError, Exception) as e:
796 log.exception(safe_str(e))
797 h.flash(safe_str(h.escape(e)), category='error')
798 raise HTTPFound(h.route_path(
799 'repo_files', repo_name=self.db_repo_name,
800 commit_id='tip', f_path='/'))
794 return _d + _f
801 return _d + _f
795
802
796 cache_manager = self._get_tree_cache_manager(caches.FILE_SEARCH_TREE_META)
803 cache_manager = self._get_tree_cache_manager(
804 caches.FILE_SEARCH_TREE_META)
797
805
798 cache_key = caches.compute_key_from_params(
806 cache_key = caches.compute_key_from_params(
799 repo_name, commit_id, f_path)
807 repo_name, commit_id, f_path)
General Comments 0
You need to be logged in to leave comments. Login now